Heroku推送:命令错误'egg_info'无效

时间:2013-11-09 07:33:24

标签: python heroku

每当我尝试部署到Heroku时,我都会收到一个类似于此问题的错误(Python pip install fails: invalid command egg_info)如何解决此问题?它刚开始是一个恼人的事情,它会在第二次推动时消失,但现在我根本无法推动。

我的requirements.txt文件。注意:我已经尝试过尝试放入'setuptools'并将其删除,但它没有改变任何内容。

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

1 个答案:

答案 0 :(得分:6)

我最近遇到过这个错误,即使这个问题是4年零4个月,它也是唯一一个关于这个问题的人。

就我而言,测试已经停止运行,所以我检查了错误日志:

-----> 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'

在日志文件开头似乎只有一条信息/弃用消息实际上是我的解决方案:runtime.txt文件中的我将python版本更改为2.7.14

一切都很顺利。希望这有助于某人。