【发布时间】:2018-04-15 16:25:19
【问题描述】:
我在 python 中提出了一个烧瓶应用程序,它在 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.
下面是我的 requirements.txt::
docutils==0.11
MarkupSafe==0.19
Pygments==1.6
Sphinx==1.2.2
requests==1.2.0
Flask==0.10.1
Jinja2==2.6
Werkzeug==0.8.3
certifi==0.0.8
chardet==1.0.1
distribute==0.6.24
gunicorn==0.14.2
请帮忙!感谢 Flask 的新手。
【问题讨论】:
-
你用的是哪个版本的python?
-
我正在使用 python 2.7
标签: python heroku flask deployment build-error