Python heroku -app与buildpack不兼容

Sül*_*man 2 python heroku

我阅读了以前的所有文章,但仍然无法纠正。我在Heroku创建的计算机目录中添加了requirements.txt和Procfile。Procfile读取“ web:python Chat Server.py”。还在读取“ python-3.6.2”的同一目录中添加了runtime.txt。但是,在命令提示符下,它始终再次给出相同的错误。我该如何解决?这是整个错误消息:

“ C:\ Users \ asus \ chat_server> git push heroku master计数对象:6个,完成。使用最多4个线程的Delta压缩。压缩对象:100%(4/4),完成。编写对象:100%(6 / 6),1.14 KiB | 585.00 KiB / s,完成。共6(增量1),重用0(增量0)远程:压缩源文件...完成。远程:构建源:远程:远程:----- >应用程序与buildpack不兼容:https : //codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/python.tgz 远程:更多信息:https : //devcenter.heroku.com/articles/buildpacks#detection-failure 远程:远程:!推送失败的远程:验证部署...远程:远程:!将拒绝推送到沸腾流15219远程:到https://git.heroku.com/boiling-stream-15219.git ![远程拒绝] master-> master(拒绝预接收钩)错误:无法将某些引用推送到' https://git.heroku.com/boiling-stream-15219.git '

Jar*_*edH 7

任何人阅读以下内容:您将需要两个文件:

第一个文件: requirements.txt包含类似以下内容: gunicorn==19.7.1 或任何结果pip freeze > requirements.txt

第二个文件: Procfile包含类似内容: web: gunicorn app:app 或可能为空。请注意,app:app在此示例中,是对python文件名的引用。这意味着每次web声明一个进程并启动这种类型的dyno时,也要运行命令gunicorn app:app来启动Web服务器。

然后git add .git commit -m "added Procfile and requirements.txt"

然后运行git push heroku master以从本地master分支推送到heroku远程。