使用python 3.8将Django部署到heroku
我正在尝试将我的django应用程序部署到Heroku 但当我这么做的时候使用python 3.8将Django部署到heroku,python,django-rest-framework,Python,Django Rest Framework,我正在尝试将我的django应用程序部署到Heroku 但当我这么做的时候 git push heroku master 我得到以下错误: remote: -----> Python app detected remote: ! Requested runtime (python-3.8) is not available for this stack (heroku-18). remote: ! Aborting. More info: https://devce
git push heroku master
我得到以下错误:
remote: -----> Python app detected
remote: ! Requested runtime (python-3.8) is not available for this stack (heroku-18).
remote: ! Aborting. More info: https://devcenter.heroku.com/articles/python-support
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to djangomessagesapi.
remote:
To https://git.heroku.com/djangomessagesapi.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/djangomessagesapi.git'
我在runtime.txt文件中更改了python版本,但返回相同的错误
更新
通过在runtime.txt中更改为Python3.6,我成功地传递了这一点。
但在运行时,我会出现一个新错误:
remote: ERROR: Could not find a version that satisfies the requirement pkg-resources==0.0.0 (from -r /tmp/build_07acbad0cae4c62609ee48dc9cec3685/requirements.txt (line 22)) (from versions: none)
remote: ERROR: No matching distribution found for pkg-resources==0.0.0 (from -r /tmp/build_07acbad0cae4c62609ee48dc9cec3685/requirements.txt (line 22))
尝试从
requirements.txt中删除pkg资源==0.0.0
@Hisham\uuuuuuuuuu-Pak我做了,似乎Heroku正在从错误中看到的某个tmp目录中读取需求。尝试从requirements.txt中删除pkg资源==0.0.0
,从错误中可以看出,Heroku似乎正在从某个tmp目录读取需求。