【发布时间】:2013-12-08 20:52:52
【问题描述】:
我试图为教程安装 postgres,但 pip 给了我错误:
pip install psycopg
我得到的错误片段:
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'.
pg_config 在我的 virtualenv 中在哪里?如何配置它?我使用 virtualenv 是因为我不想在系统范围内安装 postgres。
【问题讨论】:
-
我是唯一一个提供了相关答案的人,他提供了如何使用 virtualenv 处理它并且没有错过 brew 等。请参阅:stackoverflow.com/questions/20170895/…
标签: python macos postgresql psycopg2