【问题标题】:Unable to install MySQL-python " invalid command 'egg_info' "无法安装 MySQL-python“无效命令 'egg_info'”
【发布时间】:2013-09-27 06:53:59
【问题描述】:

运行后出现奇怪的错误 $ pip install mysql-python

有没有人看到过类似“egg_info”无效的错误?

我正在运行 OSX 山狮

Downloading/unpacking MySQL-python
  Using download cache from /Users/Marcus/.pip/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FM%2FMySQL-python%2FMySQL-python-1.2.4.zip
  Running setup.py egg_info for package MySQL-python
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz
Extracting in /var/folders/ss/nxvs3w690xqbpvr_l0v31mrw0000gn/T/tmpg_MvY6
Now working in /var/folders/ss/nxvs3w690xqbpvr_l0v31mrw0000gn/T/tmpg_MvY6/distribute-0.6.28
Building a Distribute egg in /Users/Marcus/sites/venv/build/MySQL-python
/Users/Marcus/sites/venv/build/MySQL-python/distribute-0.6.28-py2.7.egg
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'
Complete output from command python setup.py egg_info:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz

Extracting in /var/folders/ss/nxvs3w690xqbpvr_l0v31mrw0000gn/T/tmpg_MvY6

Now working in /var/folders/ss/nxvs3w690xqbpvr_l0v31mrw0000gn/T/tmpg_MvY6/distribute-0.6.28

Building a Distribute egg in /Users/Marcus/sites/venv/build/MySQL-python

/Users/Marcus/sites/venv/build/MySQL-python/distribute-0.6.28-py2.7.egg

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'

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /Users/Marcus/sites/venv/build/MySQL-python
Storing complete log in /Users/Marcus/.pip/pip.log

谢谢

--- 我在运行时遇到同样的错误 $ pip install django

【问题讨论】:

    标签: python mysql pip mysql-python


    【解决方案1】:

    您需要分发现在位于 setuptools 中的软件包:

    pip install --upgrade setuptools
    

    【讨论】:

    • 这在我的情况下有效。奇怪,因为我以为我有最新的 setuptools(通过 ez_setup.py 安装)但是当我运行它时,pip 说我分发的是 0.6.38 而不是最新的 0.7.3。
    猜你喜欢
    • 2012-07-10
    • 1970-01-01
    • 2019-11-03
    • 2015-06-20
    • 2018-01-28
    • 1970-01-01
    • 2013-11-21
    • 1970-01-01
    • 2012-10-11
    相关资源
    最近更新 更多