使用pip安装时出现错误

8
尝试使用pip卸载软件包时,我卸载了一些软件包,现在pip无法正常工作。我尝试安装pandas:
[sudo] pip install pandas

以下是错误信息:

Requirement already satisfied (use --upgrade to upgrade): pandas in /usr/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /usr/local/lib/python2.7/dist-packages (from pandas)
Downloading/unpacking pytz (from pandas)
Downloading pytz-2013b.zip (535kB): 535kB downloaded
Running setup.py egg_info for package pytz
/usr/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'
Complete output from command python setup.py egg_info:
/usr/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'

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-root/pytz
Storing complete log in /root/.pip/pip.log

我使用的是Linux Mint Mate 15,我该如何解决这个问题?

2个回答

5

使用pip install -U setuptools命令升级您的setuptools安装。


1
尝试使用pip install distribute安装distribute。

请尝试使用pip install pandas重新安装pandas。命令egg_info应该包含在distribute中。 - ncho
我建议您尝试重新安装distribute和pip,但除此之外我无法提供更多的帮助。 - ncho

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接