gpt4 book ai didi

python - 无法在 OSX Anaconda 上安装 psycopg2

转载 作者:太空宇宙 更新时间:2023-11-03 15:37:15 25 4
gpt4 key购买 nike

这就是我得到的:

Adnans-MBP:~ AdnanAhmad$ easy_install psycopg2
Searching for psycopg2
Reading https://pypi.python.org/simple/psycopg2/
Downloading https://pypi.python.org/packages/7b/a8/dc2d50a6f37c157459cd18bab381c8e6134b9381b50fbe969997b2ae7dbc/psycopg2-2.6.2.tar.gz#md5=4a392949ba31a378a18ed3e775a4693f
Best match: psycopg2 2.6.2
Processing psycopg2-2.6.2.tar.gz
Writing /var/folders/d3/t5c58nx570ggzzknhm4zpjnw0000gn/T/easy_install-66rCLK/psycopg2-2.6.2/setup.cfg
Running psycopg2-2.6.2/setup.py -q bdist_egg --dist-dir /var/folders/d3/t5c58nx570ggzzknhm4zpjnw0000gn/T/easy_install-66rCLK/psycopg2-2.6.2/egg-dist-tmp-Vu8qsu
In file included from psycopg/psycopgmodule.c:27:
./psycopg/psycopg.h:31:10: fatal error: 'libpq-fe.h' file not found
#include <libpq-fe.h>
^
1 error generated.
error: Setup script exited with error: command 'gcc' failed with exit status 1

我正在使用PostgreSql.app

最佳答案

好吧,既然你无论如何都在使用 anaconda,不妨利用它们的二进制包!他们有一个用于 PostgreSQL 的!只需输入

conda install psycopg2

关于python - 无法在 OSX Anaconda 上安装 psycopg2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42436087/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com