python - 无法找出 Heroku 应用程序失败的位置 [错误 : pg_config executable not found.]

标签 python django heroku

希望你能帮我解决这个问题。我正在艰难地浏览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/

相关文章:

python - 为什么 python 认为我列表中的每个字符都是一个元素?

python - 按数据框重新排序 pandas group

具有多个实例的 Django 应用程序 - 如何确保每日电子邮件仅发送一次?

java - 在heroku上部署而不保留gradlew文件

ruby - IndexTank 自动完成 : modifying the autocomplete field text for each result returned

python - 使用 'iso-8859-1' 解码字节串是否会引发 UnicodeDecodeError

python - 在字符串中的特定单词之后插入项目

python - Django allauth 自定义登录表单不呈现自定义用户模型中的所有字段

python - Django 表单图像字段出现在 self.data 中但没有出现在 self.cleaned_data 中

ruby-on-rails - 当我没有任何供应商/插件时,Rails 弃用警告