簡體   English   中英

Heroku上的Python入門 - 找不到pg_config可執行文件

[英]Getting Started with Python on Heroku - pg_config executable not found

我一直在關注文檔,直到我開始安裝requirements.txt文件。 嘗試安裝第6行“psycopg2 == 2.5.3”時總是會失敗。 這是消息 -

Downloading/unpacking psycopg2==2.5.3 (from -r requirements.txt (line 6))
Downloading psycopg2-2.5.3.tar.gz (690kB): 690kB downloaded
Running setup.py (path:/Users/pimpc/Sites/python/herokudemo/python-getting-started/venv/build/psycopg2/setup.py) egg_info for package psycopg2

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'.
Complete output from command python setup.py egg_info:
running egg_info

creating pip-egg-info/psycopg2.egg-info

writing pip-egg-info/psycopg2.egg-info/PKG-INFO

writing top-level names to
pip-egg-info/psycopg2.egg-info/top_level.txt

writing dependency_links to
pip-egg-info/psycopg2.egg-info/dependency_links.txt

writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'

warning: manifest_maker: standard file '-c' not found



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'.

當然我發現了幾個帖子。 所以我開始檢查事情。 我相信mac的postgres應用程序帶有psycopg2。 我確實已將postgres添加到我的路徑並在終端中運行“echo $ PATH”。 我沒有任何其他舊版本沖突。 postgres文檔說我應該把它添加到我的路徑中 -

export PATH =“/ Applications / Postgres.app / Contents / Versions / 9.3 / bin:$ PATH:$ PATH”

我重新啟動了postgres應用程序,停用並重新啟動了虛擬環境,無論如何我都得到了同樣的錯誤。

我可能會俯瞰什么! 我已閱讀並閱讀此處的其他帖子,甚至還有關於此問題的博客。

在閱讀了幾十個相同的錯誤后,人們都在使用postgres mac app。 我決定通過brew安裝postgres,現在一切正常。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM