【发布时间】:2018-06-19 10:35:57
【问题描述】:
我正在尝试在 heroku 上托管我的 dango rest 应用程序。当我跑步时
git push heroku master
我收到错误日志
remote: -----> Python app detected
remote: ! The latest version of Python 3 is python-3.6.4 (you
are using python-3.6.3, which is unsupported).
remote: ! We recommend upgrading by specifying the latest
version (python-3.6.4).
remote: Learn More:
https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing requirements with pip
remote: Collecting pkg-resources==0.0.0 (from -r
/tmp/build_76cc8692e5f28e80c394427df6e4d58b/requirements.txt (line
9))
remote: Could not find a version that satisfies the
requirement pkg-resources==0.0.0 (from -r /
tmp/build_76cc8692e5f28e80c394427df6e4d58b/requirements.txt (line 9))
(from versions: )
remote: No matching distribution found for pkg-
resources==0.0.0 (from -r
/tmp/build_76cc8692e5f28e80c394427df6e4d58b/requirements.txt (line
9))
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to myapp.
remote:
To https://git.heroku.com/myapp.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to
'https://git.heroku.com/myapp.git'
requirements.txt 文件是
dj-database-url==0.4.2
Django==1.11.2
django-rest-auth==0.9.2
djangorestframework==3.6.4
djangorestframework-jwt==1.11.0
gunicorn==19.7.1
olefile==0.44
Pillow==4.2.0
psycopg2==2.7.3
PyJWT==1.5.3
pytz==2017.2
six==1.11.0
whitenoise==3.3.1
push 被 heroku 拒绝。请帮忙。
【问题讨论】:
-
它清楚地显示找不到满足pkg-resources==0.0.0要求的版本,那么问题出在哪里?从文本文件中删除该包名称并再次检查
-
你必须在你的 runtime.txt 中指定正确的版本。
-
@CodeWizard 我添加了 requirements.txt。 ps检查
-
@Exprator 从哪里删除那个包?请正确阅读日志。