首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >推送被拒绝到herokuapp

推送被拒绝到herokuapp
EN

Stack Overflow用户
提问于 2018-01-10 17:39:39
回答 1查看 338关注 0票数 0

我正在尝试在heroku上托管我的dango rest应用程序。当我跑的时候

代码语言:javascript
复制
git push heroku master

我得到了错误日志

代码语言:javascript
复制
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文件是

代码语言:javascript
复制
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

推送被heroku拒绝。请帮帮忙。

EN

回答 1

Stack Overflow用户

发布于 2018-02-05 22:03:07

您本地的requirements.txt是否与master分支的requirements.txt匹配?

我遇到了同样的问题,最终我意识到我的主分支在requirements.txt中有pkg-resources行,而我的本地分支没有。我从requirements.txt中删除了那行,做了git commitgit push,下一次我尝试将我的应用推送到heroku时,我成功了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48184343

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档