【发布时间】:2021-12-12 10:32:21
【问题描述】:
我在其他任何地方都找不到的主要问题是括号包含 runtime.txt 的所有其他行。这让我相信还有其他问题,但我在网上找不到任何解决方案。附上构建日志以供参考。
-----> Building on the Heroku-20 stack
-----> Determining which buildpack to use for this app
-----> Python app detected
-----> Using Python version specified in runtime.txt
! Requested runtime (asgiref==3.4.1
colorama==0.4.4
comtypes==1.1.10
cycler==0.10.0
dj-database-url==0.5.0
Django==3.2.6
docx2pdf==0.1.7
gunicorn==20.1.0
joblib==1.0.1
kiwisolver==1.3.2
lxml==4.6.3
matplotlib==3.4.3
mysql-connector-python==8.0.26
numpy==1.21.2
Pillow==8.3.2
psycopg2==2.9.1
pyparsing==2.4.7
python-dateutil==2.8.2
python-docx==0.8.11
pytz==2021.1
pywin32==227
scikit-learn==0.24.2
scipy==1.7.1
six==1.16.0
sklearn==0.0
sqlparse==0.4.1
threadpoolctl==2.2.0
tqdm==4.62.3
whitenoise==5.3.0
python-3.9.7) is not available for this stack (heroku-20).
! Aborting. More info: https://devcenter.heroku.com/articles/python-support
! Push rejected, failed to compile Python app.
! Push failed
【问题讨论】:
-
这是Django application error when deploying to heroku 的骗子,但不幸的是我不能作为骗子关闭,因为没有答案被赞成或接受。那边的 OP 评论说 my answer 解决了他们的问题,但忽略了接受它。基本上,您的
runtime.txt应该包含仅python-3.9.7。所有其他依赖项都进入requirements.txt。
标签: python django heroku deployment runtime