我是heroku以及python(Django)的新手。我在django做了一个应用程序,想要推进heroku。但在git push heroku master
它给了我这个错误。
Writing objects: 100% (245/245), 10.37 MiB | 110.00 KiB/s, done.
Total 245 (delta 35), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing Python-2.7.13
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote: /app/tmp/buildpacks/779a8bbfbbe7e1b715476c0b23fc63a2103b3e4131eda
all: line 5: /app/.heroku/python/bin/pip: No such file or directory
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy....
remote:
remote: ! Push rejected to djangoshopnror.
remote:
To https://git.heroku.com/djangoshopnror.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to
'https://git.heroku.com/djangoshopnror.git'
我有requirements.txt文件和runtime.txt文件。 runtime.txt 看起来像这样
Python-2.7.13
和 requirements.txt 看起来像这样
BestBuyAPI==0.0.51
dj-database-url==0.4.2
Django==1.9
django-cors-headers==2.0.2
djangorestframework==3.6.2
djangorestframework-jwt==1.10.0
ebaysdk==2.1.4
gunicorn==19.7.1
lxml==3.7.3
psycopg2==2.7.1
PyJWT==1.5.0
pytz==2017.2
requests==2.7.0
virtualenv==15.1.0
wapy==1.0.0
whitenoise==3.3.0
当我用python版本3.5.x更改runtime.txt时,它可以运行。但由于某些原因,我必须使用python 2.7.x. 任何人都可以回答这个问题。任何建议或帮助都会受到高度关注。