gpt4 book ai didi

python - Anaconda更新与pip更新和conda更新冲突,anaconda中安装的pip好像坏了

转载 作者:太空宇宙 更新时间:2023-11-04 06:07:26 24 4
gpt4 key购买 nike

我刚开始在 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

最佳答案

问题是影响 pip 的分发错误。该错误消息有 pip 误导,因为您只是被告知“pip list”发生了错误

要解决此问题,您需要删除分发,然后安装安装工具(它取代了分发)。

conda remove distribute
conda update setuptools

这些命令应该可以解决问题。这将在下一个版本的 Anaconda 中修复。

关于python - Anaconda更新与pip更新和conda更新冲突,anaconda中安装的pip好像坏了,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21214635/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com