我用python开发了一个flask应用程序,它在localhost服务器上运行良好。在
现在,在云服务Heroku上部署它时,生成失败,并出现以下错误:
remote: Downloading distribute-0.6.24.tar.gz (620kB)
remote: Complete output from command python setup.py egg_info:
remote: Traceback (most recent call last):
remote: File "<string>", line 1, in <module>
remote: File "/tmp/pip-install-_ofp1xky/distribute/setuptools/__init__.py", line 2, in <module>
remote: from setuptools.extension import Extension, Library
remote: File "/tmp/pip-install-_ofp1xky/distribute/setuptools/extension.py", line 2, in <module>
remote: from setuptools.dist import _get_unpatched
remote: File "/tmp/pip-install-_ofp1xky/distribute/setuptools/dist.py", line 103
remote: except ValueError, e:
remote: ^
remote: SyntaxError: invalid syntax
remote:
remote: ----------------------------------------
remote: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-_ofp1xky/distribute/
remote: ! Push rejected, failed to compile Python app.
下面是我的要求.txt::
^{pr2}$请帮忙!谢谢你的新手。在
似乎您应该将
distribute
需求更新为distribute-0.7.3
。请记住,heroku支持最新的python,但是如果希望支持https://devcenter.heroku.com/articles/python-runtimes,可以更改运行时除此之外,您可以完全删除
distribute
,因为它不是必需的,它只是heroku中的一个示例。烧瓶应用程序可以运行没有这个。在另外,最好使用带有
Pipfile
的推荐样式,而不是requirements。在如果你想检查https://github.com/yefim/flask-heroku-sample
相关问题 更多 >
编程相关推荐