Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/313.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用python 3.8将Django部署到heroku_Python_Django Rest Framework - Fatal编程技术网

使用python 3.8将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

我正在尝试将我的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://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目录读取需求。