Reputation: 449
I was trying to deploy a simple app to heroku using git push heroku master, then I got the following error:
$git push heroku master
Initializing repository, done.
Counting objects: 14, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (14/14), 8.85 KiB | 0 bytes/s, done.
Total 14 (delta 2), reused 0 (delta 0)
-----> Python app detected
-----> Installing runtime (python-2.7.8)
-----> Installing dependencies with pip
Exception:
Traceback (most recent call last):
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 262, in run
for req in parse_requirements(filename, finder=finder, options=options, session=session):
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1629, in parse_requirements
line, comes_from=comes_from, default_vcs=options.default_vcs if options else None)
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 124, in from_editable
prereleases=True)
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 70, in __init__
req = pkg_resources.Requirement.parse(req)
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/pkg_resources.py", line 2667, in parse
reqs = list(parse_requirements(s))
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/pkg_resources.py", line 2605, in parse_requirements
line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/pkg_resources.py", line 2573, in scan_list
raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'Flask-origin/HEAD', 'at', '/HEAD')
Storing debug log for failure in /app/.pip/pip.log
! Push rejected, failed to compile Python app
To [email protected]:still-brook-1028.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:still-brook-1028.git'
I guess there might be some version inconsistence, but cannot figure out which one it is. Here is my requirements.txt:
-e git+http://github.com/mitsuhiko/flask.git@577581665ce745898c29ca502e0a3aba1f16677e#egg=Flask-origin/HEAD
Jinja2==2.7.3
MarkupSafe==0.18
Werkzeug==0.9.6
click==2.4
gunicorn==19.0.0
itsdangerous==0.24
wsgiref==0.1.2
This is my first post here, so if anything doesn't look good, pls let me know. Thanks a lot~!
Upvotes: 2
Views: 992
Reputation: 14126
Remove the -origin/HEAD
part from git+http://github.com/mitsuhiko/flask.git@577581665ce745898c29ca502e0a3aba1f16677e#egg=Flask-origin/HEAD
:
-e git+http://github.com/mitsuhiko/flask.git@577581665ce745898c29ca502e0a3aba1f16677e#egg=Flask
Jinja2==2.7.3
MarkupSafe==0.18
Werkzeug==0.9.6
click==2.4
gunicorn==19.0.0
itsdangerous==0.24
wsgiref==0.1.2
When using VCS the text after #egg=
has to be a valid requirement specifier, the same format as when specifying packages directly:
The url suffix "egg=<project name>" is used by pip in it’s dependency logic to identify the project prior to pip downloading and analyzing the metadata.
Upvotes: 1