我正在尝试按照Heroku上的教程来部署Django应用程序。根据教程(https://devcenter.heroku.com/articles/getting-started-with-django),我在一个虚拟环境中执行此操作,并且已经达到了我输入的点:
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),它似乎描述了相同的问题,我尝试了该帖子上提供的解决方案,但得到了相同的错误消息。我不清楚这个问题的原始发帖是否已经找到了解决问题的方法,但我希望有人能有一个想法。
这对任何人来说都很熟悉吗?我对此还是个新手,在这一点上还没有什么好的想法。感谢您的阅读和您能提供的任何帮助!
发布于 2015-05-18 18:33:21
这为我解决了这个问题:http://schalk-neethling.co.za/2015/01/resolving-error-pg_config-executable-not-found-on-mac/
https://stackoverflow.com/questions/23581636
复制相似问题