我正在关注这个快速入门指南:http://devcenter.heroku.com/articles/python但是当我到达“git push heroku master”的部分时,它给了我以下日志。 :(如果有人可以帮助我,我会非常感激。我已经删除并重新创建了大约4次初始应用程序,它始终是同样的问题。
git push heroku master
Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (6/6), 1.12 KiB, done.
Total 6 (delta 0), reused 0 (delta 0)
-----> Heroku receiving push
-----> Python app detected
-----> Preparing virtualenv version 1.7
New python executable in ./bin/python
Installing distribute.............................................................................................................................................................................................done.
Installing pip...............done.
-----> Activating virtualenv
-----> Installing dependencies using pip version 1.0.2
Downloading/unpacking Flask==0.8 (from -r requirements.txt (line 1))
Creating supposed download cache at /app/tmp/repo.git/.cache/pip_downloads
Storing download in cache at /app/tmp/repo.git/.cache/pip_downloads/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FF%2FFlask%2FFlask-0.8.tar.gz
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'
Downloading/unpacking Jinja2==2.6 (from -r requirements.txt (line 2))
Storing download in cache at /app/tmp/repo.git/.cache/pip_downloads/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FJ%2FJinja2%2FJinja2-2.6.tar.gz
Running setup.py egg_info for package Jinja2
warning: no previously-included files matching '*' found under directory 'docs/_build'
warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
Downloading/unpacking PyRSS2Gen==1.0.0 (from -r requirements.txt (line 3))
Downloading PyRSS2Gen-1.0.0.tar.gz
Storing download in cache at /app/tmp/repo.git/.cache/pip_downloads/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FP%2FPyRSS2Gen%2FPyRSS2Gen-1.0.0.tar.gz
Running setup.py egg_info for package PyRSS2Gen
Downloading/unpacking Twisted==11.0.0 (from -r requirements.txt (line 4))
Storing download in cache at /app/tmp/repo.git/.cache/pip_downloads/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FT%2FTwisted%2FTwisted-11.0.0.tar.bz2
Running setup.py egg_info for package Twisted
Downloading/unpacking Werkzeug==0.8.3 (from -r requirements.txt (line 5))
Storing download in cache at /app/tmp/repo.git/.cache/pip_downloads/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FW%2FWerkzeug%2FWerkzeug-0.8.3.tar.gz
Running setup.py egg_info for package Werkzeug
warning: no files found matching '*' under directory 'werkzeug/debug/templates'
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'
Downloading/unpacking altgraph==0.7.1 (from -r requirements.txt (line 6))
Downloading altgraph-0.7.1.tar.gz
Storing download in cache at /app/tmp/repo.git/.cache/pip_downloads/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fa%2Faltgraph%2Faltgraph-0.7.1.tar.gz
Running setup.py egg_info for package altgraph
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/tmp/build_qhsjytq4dlst/build/altgraph/setup.py", line 31, in <module>
LONG_DESCRIPTION += open('doc/changelog.rst', 'rU').read()
IOError: [Errno 2] No such file or directory: 'doc/changelog.rst'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/tmp/build_qhsjytq4dlst/build/altgraph/setup.py", line 31, in <module>
LONG_DESCRIPTION += open('doc/changelog.rst', 'rU').read()
IOError: [Errno 2] No such file or directory: 'doc/changelog.rst'
----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in /app/.pip/pip.log
! Heroku push rejected, failed to compile Python app
To git@heroku.com:PRIVATENAME.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:PRIVATENAME.git'</code>
答案 0 :(得分:6)
根据https://bitbucket.org/ronaldoussoren/altgraph/issue/2/071-cannot-be-installed-from-release,altgraph的0.7.1版本存在一个导致此失败的错误。
从日志中判断,您可以通过更改requirements.txt文件的第6行来解决此问题,以请求使用不同版本的altgraph。
你可以尝试0.7.2,甚至更新的0.8和0.9版本。