【发布时间】:2014-06-28 04:45:51
【问题描述】:
我正在尝试按照 Heroku 上的教程来部署 Django 应用程序。根据教程 (https://devcenter.heroku.com/articles/getting-started-with-django),我在 virtualenv 环境中执行此操作,并且已经到了我输入的点:
pip install django-toolbelt
当我尝试安装 django-toolbelt 时,我收到以下错误消息:
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'.
我尝试从源代码下载 PostgreSQL 并自己编译,我尝试从 django-toolbelt 单独下载 psycopg2,然后进入 psycopg2 文件夹并为 pg_config 添加特定路径文件。我发现一个旧线程 (Error when attempting to install django-toolkit within a python virtualenv) 似乎描述了相同的问题,并且我尝试了该帖子中提供的解决方案,并得到了相同的错误消息。我不清楚该问题的原始发布者是否找到了解决问题的方法,但我希望有人有想法。
这听起来对任何人来说都很熟悉吗?我对此很陌生,只是对目前还可以尝试什么没有任何好主意。感谢您的阅读以及您可以提供的任何帮助!
【问题讨论】:
标签: python django macos postgresql heroku