简体   繁体   中英

Anaconda update conflicts with pip update and conda update, and pip installed in anaconda seems broken

I just got started with anaconda on Ubuntu 12.04. When I try updating following the instructions here I get a conflict:

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  

So I update pip

nikos@nikos-hp:~$ conda update pip -p /home/nikos/anaconda

which updates to pip-1.5, and links it to anaconda. Then I proceed to update anaconda as well

nikos@nikos-hp:~$ conda update anaconda

at which point I stop, since this update seems to want to link back to pip-1.4.1, which I just upgraded from.

As I understand from this post here I should stick to pip 1.4.1, even if conda warns me to upgrade to 1.5. However, no matter which version I link, I get an error

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

The problem is a bug in distribute that affects pip. The error message is a bit misleading because you are just being informed that an error occurred with "pip list"

To fix the problem you need to remove distribute and then install setuptools (which replaces distribute).

conda remove distribute
conda update setuptools 

Those commands should fix the problem. This will be fixed in the next version of Anaconda.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM