[英]Push rejected, failed to compile Python app in heroku (Python Crash Course)
我正在 Eric Matthes 的 Python Crash Course 中完成學習日志項目,特別是在學習日志應用程序上工作。 我正在嘗試部署到 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。 我的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 版本改回 do 3.7.3 修復了它。 能夠構建python並執行。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.