我正在尝试使用 python django 部署应用程序。
但是当我收到此错误时:
从我的构建登录 heroku ..
-----> Python app detected
....
-----> Installing requirements with pip
...
Collecting psycopg2==2.6.2
Downloading psycopg2-2.6.2.tar.gz (376 kB)
ERROR: Command errored out with exit status 1:
command: /app/.heroku/python/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-a0nakbaj/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-a0nakbaj/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-a0nakbaj/psycopg2/pip-egg-info
cwd: /tmp/pip-install-a0nakbaj/psycopg2/
Complete output (7 lines):
.....
Error: could not determine PostgreSQL version from '12.2'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
! Push rejected, failed to compile Python app.
! Push failed
如果您需要,这是我的 requeriments.txt:
colorama==0.4.1
dj-database-url==0.5.0
Django==2.2.1
django-qr-code==1.0.0
gunicorn==19.9.0
Pillow==6.0.0
psycopg2==2.6.2
pytz==2019.1
qrcode==6.1
six==1.12.0
sqlparse==0.3.0
whitenoise==4.1.2
任何人都可以帮助我 whis 吗?
谢谢!
Heroku 建议将 psycopg2 升级到 2.7 及更高版本。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句