无法确定Heroku应用程序失败的位置[错误:找不到pg_config可执行文件。]

时间:2015-12-01 21:33:03

标签: python django heroku

希望你能帮我解决这个问题。我正在浏览Heroku 'Getting Started with Python'页面,您可以在其中安装必要的依赖项以在本地运行应用程序。这一切都运行良好,直到第2步到最后一步,运行命令Canvas。我运行它,然后是下一个命令virtualenv venv,以及我收到此错误的地方:

pip install -r requirements.txt --allow-all-external

我不明白为什么我会收到此错误。任何人都可以帮助我理解它吗?

我的requirements.txt版本:

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'.

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_nickcode/psycopg2
Storing debug log for failure in /tmp/tmpb5tCeK

2 个答案:

答案 0 :(得分:1)

pg_config是postgresql(http://www.postgresql.org/docs/8.1/static/app-pgconfig.html)的一部分。 所以你需要安装postgresql。

答案 1 :(得分:1)

brew install postgresql

在macOS上解决了此问题

相关问题