【问题标题】:Error message installing Django-toolbelt on MacOSX在 MacOS 上安装 Django-tool 带的错误消息
【发布时间】: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


    【解决方案1】:

    这为我解决了这个问题:http://schalk-neethling.co.za/2015/01/resolving-error-pg_config-executable-not-found-on-mac/

    • brew 安装 postgresql
    • export PATH=/usr/local/Cellar/postgresql/9.4.0/bin:$PATH 注意:检查您的版本号
    • pip install psycopg2

    【讨论】:

      猜你喜欢
      • 2019-09-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-19
      • 2019-10-11
      • 2020-01-15
      • 2017-06-27
      • 2011-06-25
      相关资源
      最近更新 更多