Every time I try to deploy to Heroku I get an error that looks like from this question (Python pip install fails: invalid command egg_info) How do I resolve this issue? It just started as an annoying thing that would go away on the second push, but now I can't push at all.
My requirements.txt file. NOTE: I already tried experimenting with putting in 'setuptools' and leaving it out and it didn't change anything.
Django==1.5.5
dj-database-url==0.2.1
psycopg2==2.4.6
wsgiref==0.1.2
South==0.8.1
pytz==2013b
gunicorn==0.17.4
django-storages==1.1.6
django-extensions==1.1.1
boto==2.9.9
xhtml2pdf==0.0.5
django-debug-toolbar==0.10.2
numpy==1.6.2
pandas==0.11.0
django-model-utils==1.4.0
django-mailchimp-v1.3==1.3
requests==2.0.0
stripe==1.9.1
django-appconf==0.6
newrelic
redis==2.7.6
django-redis==3.3
rq==0.3.8
django-rq==0.5.1
django-loginas==0.1.3
djangorestframework==2.3.8
pusher==0.8
django-json-field==0.5.5
ZSI==2.0-rc3
APScheduler==2.1.0
django-twilio==0.4
rq-scheduler==0.3.6
django-ios-notifications==0.1.5
mixpanel-py==3.0.0
I've recently experienced this error and, even though the question is 4 years, 4 months old, it's the only one here on SO regarding this issue.
In my case, tests stopped running out of the blue, so I checked the error log :
-----> Python app detected
! The latest version of Python 2 is python-2.7.14 (you are using python-2.7.13, which is unsupported).
! We recommend upgrading by specifying the latest version (python-2.7.14).
Learn More: https://devcenter.heroku.com/articles/python-runtimes
-----> Installing pip
-----> Installing requirements with pip
...
Collecting coverage==4.1 (from -r dev-requirements.txt (line 14))
Downloading coverage-4.1.tar.gz (370kB)
Complete output from command python setup.py egg_info:
/app/.heroku/python/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'entry_points'
warnings.warn(msg)
/app/.heroku/python/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'
warnings.warn(msg)
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'egg_info'
What appears to be only an information/deprecation message at the beginning of the log file was actually my solution : in the runtime.txt
file I changed the python version to 2.7.14
.
All is well now. Hope this helps someone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With