推送被拒绝,未能在heroku中编译Python应用程序(Python速成课程)

推送被拒绝,未能在heroku中编译Python应用程序(Python速成课程),python,django,python-3.x,heroku,Python,Django,Python 3.x,Heroku,我正在学习Eric Matthes的Python速成课程中的学习日志项目,特别是学习日志应用程序。我正在尝试部署到heroku,但出现以下错误: (ll_env) C:\Users\benpg\Documents\Coding\Python\learning_log>git push heroku master Enumerating objects: 54, done. Counting objects: 100% (54/54), done. Delta compression usi

我正在学习Eric Matthes的Python速成课程中的学习日志项目,特别是学习日志应用程序。我正在尝试部署到heroku,但出现以下错误:

(ll_env) C:\Users\benpg\Documents\Coding\Python\learning_log>git push heroku master
Enumerating objects: 54, done.
Counting objects: 100% (54/54), done.
Delta compression using up to 4 threads
Compressing objects: 100% (46/46), done.
Writing objects: 100% (54/54), 16.54 KiB | 940.00 KiB/s, done.
Total 54 (delta 4), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote:  !     Python has released a security update! Please consider upgrading to python-3.7.3
remote:        Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing python-3.7.4
remote: -----> Installing pip
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to pacific-refuge-12657.
remote:
To https://git.heroku.com/pacific-refuge-12657.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/pacific-refuge-12657.git'
尝试了一切,包括两个其他问题在开始时联系,没有运气

以下是我的requirements.txt:

Django==1.8.4
dj-database-url==0.3.0
dj-static==0.0.6
django-bootstrap3==6.2.2
gunicorn==19.3.0
static3==0.6.1
psycopg2>=2.6.1

编辑: 我正在使用django 2.2.4。My requirements.txt就是这样,因为书中有一条注释说“如果您使用的是Windows,请确保您的requirements.txt版本与此处显示的列表相匹配,无论您能够安装哪些软件包”。为什么会这样

这是我拥有的第一个requirements.txt,除了最后一行之外,它是自动生成的。这一个也不起作用,相同的错误消息:

dj-database-url==0.5.0
dj-static==0.0.6
Django==2.2.4
django-bootstrap3==11.1.0
gunicorn==19.9.0
pytz==2019.2
sqlparse==0.3.0
static3==0.7.0
psycopg2>=2.6.1

只是有同样的问题,将Python版本改回Do3.7.3修复了它。能够构建python并执行。

您是否在项目根目录下的
requirements.txt
manage.py
处于同一级别?还要检查拼写。Django 1.8.4已过期多年,未收到安全更新。Django 1.8最多支持Python 3.5,而Heroku Python 3.6和3.7则不匹配(两者都支持Python 2,但新项目应该避免使用Python 2。同时更新Django te的最新版本。或者至少
1.11.x
。我会避免遵循为Django 1.8编写的教程。从那以后,很多内容都发生了变化,所以你会遇到类似这样的问题。我不熟悉Python速成课程,所以我不知道是否有新的版本。)wer版本,它使用的是Django的最新版本。似乎有一个项目副本更新为Django 2.0,这可能会对您有所帮助。@MD.Khairl Basar requirements位于正确的目录中,已检查拼写