为了账号安全,请及时绑定邮箱和手机立即绑定

找不到pg_config可执行文件

找不到pg_config可执行文件

扬帆大鱼 2019-10-23 13:11:44
我在安装psycopg2时遇到问题。尝试执行以下操作时出现以下错误pip install psycopg2:Error: pg_config executable not found.Please add the directory containing pg_config to the PATHor 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但是问题出pg_config在我身上PATH; 它运行没有任何问题:$ which pg_config/usr/pgsql-9.1/bin/pg_config我尝试将pg_config路径添加到setup.cfg文件中,并使用从其网站(http://initd.org/psycopg/)下载的源文件进行构建,然后收到以下错误消息!Error: Unable to find 'pg_config' file in '/usr/pgsql-9.1/bin/'但是实际上是那里!!!这些错误使我感到困惑。有人可以帮忙吗?顺便说一下,我sudo所有的命令。我也在使用RHEL 5.5。
查看完整描述

3 回答

?
慕尼黑8549860

TA贡献1818条经验 获得超11个赞

pg_config位于postgresql-devellibpq-devlibpq-develCygwin / Babun上的Debian / Ubuntu中。)


查看完整回答
反对 回复 2019-10-23
?
倚天杖

TA贡献1828条经验 获得超3个赞

你安装好了python-dev吗?如果已经拥有,请尝试安装libpq-dev


sudo apt-get install libpq-dev python-dev


查看完整回答
反对 回复 2019-10-23
  • 3 回答
  • 0 关注
  • 1839 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信