Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/23.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.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
Heroku-应用程序与buildpack不兼容https://github.com/heroku/heroku-buildpack-python.git 上传Django应用程序时_Python_Django_Git_Heroku - Fatal编程技术网

Heroku-应用程序与buildpack不兼容https://github.com/heroku/heroku-buildpack-python.git 上传Django应用程序时

Heroku-应用程序与buildpack不兼容https://github.com/heroku/heroku-buildpack-python.git 上传Django应用程序时,python,django,git,heroku,Python,Django,Git,Heroku,我是Heroku的新手,当我尝试将我的项目推送到Github时,我只收到错误消息: 应用程序与buildpack不兼容: 完整输出: remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-20 stack remote: -----> Using buildpack: https://github.com/hero

我是Heroku的新手,当我尝试将我的项目推送到Github时,我只收到错误消息:

应用程序与buildpack不兼容:

完整输出:

remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: https://github.com/heroku/heroku-buildpack-python.git
remote: -----> App not compatible with buildpack: https://github.com/heroku/heroku-buildpack-python.git
remote:        More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote:  !     Push failed

remote: Verifying deploy...
remote:
remote: !       Push rejected
remote:
To https://git.heroku.com/appname.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/appname.git'
我的根目录中有一个Procfile:

web: gunicorn Food_Blog.wsgi --log-file -
我还有一个requirements.txt和runtime.txt文件

runtime.txt:

python-3.8.1

有人知道如何解决这个问题吗?

Heroku没有检测到你的应用程序是python。您的requirements.txt文件可能有问题。你应该更正文件,检查是否有打字错误。 您可以使用以下方法创建一个:

pip freeze > requirements.txt
您还可以尝试使用heroku python构建包支持的这些python运行时之一

python-3.9.4
python-3.8.9
python-3.7.10
python-3.6.13
python-2.7.18