小编Jul*_*nge的帖子

如何修复错误“错误:命令错误,退出状态1:python。” 尝试使用pip安装django-heroku时

我正在尝试使用pip安装django-heroku,但它始终会遇到错误。

我已经看到建议告诉我确保我在heroku中的python版本是最新的建议。我已经做到了。推送到heroku master之后,我运行了install命令,但它给了我以下错误。

pip install django-heroku
Run Code Online (Sandbox Code Playgroud)

错误:

 ERROR: Command errored out with exit status 1:
 command: /Users/user/Dev/trydjango/new_env/bin/python -c 'import 
 sys, setuptools, tokenize; sys.argv[0] = 
 '"'"'/private/var/folders/xl/s533dc515qs8sd3tpg7y5ty80000gp/T/pip- 
 install-xqsix26g/psycopg2/setup.py'"'"'; 

egg_info --egg-base pip-egg-info
     cwd: 
/private/var/folders/xl/s533dc515qs8sd3tpg7y5ty80000gp/T/pip- 
install-xqsix26g/psycopg2/
Complete output (23 lines):
running egg_info
creating pip-egg-info/psycopg2.egg-info
writing pip-egg-info/psycopg2.egg-info/PKG-INFO
writing dependency_links to pip-egg-info/psycopg2.egg- 
info/dependency_links.txt
writing top-level names to pip-egg-info/psycopg2.egg- 
info/top_level.txt
writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'

Error: pg_config executable not found.

pg_config is required to build psycopg2 from source.  Please add t .   he directory
containing pg_config to the …
Run Code Online (Sandbox Code Playgroud)

python django pip heroku

8
推荐指数
1
解决办法
6万
查看次数

标签 统计

django ×1

heroku ×1

pip ×1

python ×1