flask web app部署到 heroku时,提示python 版本不兼容。heroku仅支持python3.6.3?

新手上路,请多包涵

我的flask web APP 虚拟环境是python 3.5.3;
runtime.txt:python3.5.3;requirements.txt和 Procfile文件都有;执行pip install -r requirements.txt没有报错。
然而当我使用命令:git push heroku master 部署时出现:
.....
--->Python app detected

The lastest version of python 3 is python-3.6.3(you are using Python-2.7.13,which is unsupported).
We recommend upgrading by specifying the latest version(python-3.6.3).
Learn more:https//devcenter.heroku.com/articles/python-runtimes

--->Installing Python-2.7.13

Requested runtime (Python-2.7.13) is not available for this stack(heroku-16).
Aborting. More info:https://devcenter.heroku.com/articles/python-support
Push failed
....

.....
请问这是怎么回事呢,我在这个虚拟环境中运行$:python -V, 确实显示的是python3.5.3,然后我改runtime.txt:python-3.6.3 还是报错,初次入坑 python flask web,请大家帮我看看,谢谢。

阅读 2.5k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题