系统Mac OS X10.9.4
如果直接安装
sudo python set.py install
则可能出现类似如下的错误
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'.
解决方法
在setup.cfg中将pg_config参数赋值,值是系统路径下的pg_config
以我的为例,pg_config文件在/Library/PostgreSQL/9.3/bin/pg_config,则在setup.cfg中设置如下
pg_config=/Library/PostgreSQL/9.3/bin/pg_config
然后就可以重新安装了,sudo python set.py install

本文介绍了解决在MacOSX10.9.4系统上安装Python包时遇到错误的具体步骤,通过在setup.cfg文件中配置pg_config路径,从而成功解决错误问题。

被折叠的 条评论
为什么被折叠?



