相关疑难解决方法(0)

找不到pg_config可执行文件

我在安装psycopg2时遇到问题.我尝试以下时出现以下错误pip install psycopg2:

Error: pg_config executable not found.

Please add the directory containing pg_config to the PATH

or specify the full executable path with the option:



    python setup.py build_ext --pg-config /path/to/pg_config build ...



or with the pg_config option in 'setup.cfg'.

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/psycopg2
Run Code Online (Sandbox Code Playgroud)

但问题pg_config实际上是在我的PATH; 它运行没有任何问题:

$ which pg_config
/usr/pgsql-9.1/bin/pg_config
Run Code Online (Sandbox Code Playgroud)

我尝试将pg_config路径添加到该setup.cfg文件并使用我从其网站(http://initd.org/psycopg/)下载的源文件构建它,我收到以下错误消息!

Error: Unable to find 'pg_config' file in '/usr/pgsql-9.1/bin/'
Run Code Online (Sandbox Code Playgroud)

但实际上它就是!!!

我对这些错误感到困惑.有人可以帮忙吗?

顺便说一句,我 …

python pip psycopg2

646
推荐指数
38
解决办法
43万
查看次数

无法通过pip install安装psycopg2包...这是因为Sierra?

我正在为我的一个讲座工作项目,我需要下载包psycopg2才能使用正在使用的postgresql数据库.不幸的是,当我尝试pip安装psycopg2时会弹出以下错误:

ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/clang' failed with exit status 1
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/clang' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)

有谁知道为什么会这样?是因为Sierra没有支持某些套餐吗?提前致谢!

python pip psycopg2

50
推荐指数
7
解决办法
2万
查看次数

标签 统计

pip ×2

psycopg2 ×2

python ×2