我刚开始使用Ubuntu 12.04上的anaconda。当我按照说明here尝试更新时,我发生冲突:
nikos@nikos-hp:~$ conda update conda
# All packages already at latest version, nothing to do.
# packages in environment at /home/nikos/anaconda:
#
# Warning: Your version of pip is older than what conda requires for pip
# integration, so pip-installed packages will not be displayed. Please
# update pip, (conda update pip -p /home/nikos/anaconda)
conda 2.3.1 py27_0
所以我更新了pip
nikos@nikos-hp:~$ conda update pip -p /home/nikos/anaconda
更新到pip-1.5,并将其链接到anaconda。然后我继续更新anaconda
nikos@nikos-hp:~$ conda update anaconda
此时我停止了,因为此更新似乎想要链接回pip-1.4.1,我刚刚升级了。
据我所知here我应该坚持使用pip 1.4.1,即使conda警告我升级到1.5。但是,无论我链接哪个版本,我都会收到错误
nikos@nikos-hp:~/anaconda/bin$ ./pip list
apptools (4.2.0)
astropy (0.2.5)
atom (0.3.4)
.
.
scikit-learn (0.14.1)
scipy (0.13.0)
Exception:
Traceback (most recent call last):
File "/home/nikos/anaconda/lib/python2.7/site-packages/pip/basecommand.py", line 134, in main
status = self.run(options, args)
File "/home/nikos/anaconda/lib/python2.7/site-packages/pip/commands/list.py", line 80, in run
self.run_listing(options)
File "/home/nikos/anaconda/lib/python2.7/site-packages/pip/commands/list.py", line 127, in run_listing
self.output_package_listing(installed_packages)
File "/home/nikos/anaconda/lib/python2.7/site-packages/pip/commands/list.py", line 136, in output_package_listing
if dist_is_editable(dist):
File "/home/nikos/anaconda/lib/python2.7/site-packages/pip/util.py", line 347, in dist_is_editable
req = FrozenRequirement.from_dist(dist, [])
File "/home/nikos/anaconda/lib/python2.7/site-packages/pip/__init__.py", line 207, in from_dist
assert len(specs) == 1 and specs[0][0] == '=='
AssertionError
答案 0 :(得分:1)
问题是影响pip的分发错误。错误消息有点误导,因为您只是被告知“pip list”发生错误
要解决此问题,您需要删除分发,然后安装setuptools(取代分发)。
conda remove distribute
conda update setuptools
这些命令应解决问题。这将在下一版Anaconda中修复。