希望你能帮我解决这个问题。我正在艰难地浏览Heroku 'Getting Started with Python'您可以在其中安装必要的依赖项以在本地运行应用程序的页面。一切运行良好,直到第二步到最后一步,运行命令 virtualenv venv
。我运行该命令,然后运行下一个命令 pip install -rrequirements.txt --allow-all-external
,这就是我收到此错误的地方:
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
我不明白为什么会出现此错误。谁能帮我理解一下吗?
我的requirements.txt版本:
dj-database-url==0.3.0
Django==1.8.1
django-postgrespool==0.3.0
gunicorn==19.3.0
psycopg2==2.6
SQLAlchemy==1.0.4
whitenoise==1.0.6
最佳答案
pg_config 是 postgresql 的一部分 ( http://www.postgresql.org/docs/8.1/static/app-pgconfig.html )。 所以你需要安装postgresql。
关于python - 无法找出 Heroku 应用程序失败的位置 [错误 : pg_config executable not found.],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34030599/