Python Flask-部署应用程序失败,因为Pip失败
我已经在heroku上部署了几个应用程序用于教育目的。今天我用flask创建了一个新的应用程序,我像以前一样遵循heroku网站上的说明。问题发生在我需要使用pip安装其他东西的步骤Python Flask-部署应用程序失败,因为Pip失败,python,heroku,flask,pip,Python,Heroku,Flask,Pip,我已经在heroku上部署了几个应用程序用于教育目的。今天我用flask创建了一个新的应用程序,我像以前一样遵循heroku网站上的说明。问题发生在我需要使用pip安装其他东西的步骤 (venv)kiddo@kiddo-LIFEBOOK-LH531:~/Documents/Projects/workspace/hellowork$ pip install Flask gunicorn Downloading/unpacking Flask Downloading Flask-0.10.1.t
(venv)kiddo@kiddo-LIFEBOOK-LH531:~/Documents/Projects/workspace/hellowork$ pip install Flask gunicorn
Downloading/unpacking Flask
Downloading Flask-0.10.1.tar.gz (544Kb): 544Kb downloaded
Running setup.py egg_info for package Flask
warning: no files found matching '*' under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
warning: no previously-included files matching '*.pyc' found under directory 'tests'
warning: no previously-included files matching '*.pyo' found under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'examples'
warning: no previously-included files matching '*.pyo' found under directory 'examples'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'docs/_themes/.git' ...
。。。。。其他人也一样。从现在起,我无法在heroku上部署,因为它总是会弹出额外的错误以及上述错误:
Renaming /app/.heroku/python/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg into /app/.heroku/python/lib/python2.7/site-packages/setuptools-2.1-py2.7.egg.OLD.1395994594.37
Patched done.
Relaunching...
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'install' is not defined
----------------------------------------
Cleaning up...
Command /app/.heroku/python/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_u56661/distribute/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-y13sLM-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_u56661/distribute
Storing debug log for failure in /app/.pip/pip.log
! Push rejected, failed to compile Python app
To git@heroku.com:quiet-meadow-5679.git
我使用的是ubuntu,每个软件包都是最新的。我以前从来没有遇到过这个问题,我已经花了几个小时解决了。如果您有任何关于如何修复的想法,我们将不胜感激
顺便说一句,应用程序在本地主机上运行良好
谢谢您是否尝试过向Heroku支持部门发送有关此问题的消息?看起来Heroku在发生这种情况时可能遇到了API问题。您应该联系支持人员(并尝试再次部署)。我联系了heroku支持人员,这是我的本地软件包和heruku服务器软件包之间的问题。如何修复它只是从requirements.txt中删除distribute==0.6.24 他们还更新了说明页面,因此我们需要更新到每个软件包的最新版本,以便部署应用程序
Flask==0.10.1
Jinja2==2.7.2
MarkupSafe==0.19
Werkzeug==0.9.4
argparse==1.2.1
distribute==0.6.24
gunicorn==18.0
itsdangerous==0.23
wsgiref==0.1.2