pip Exception: Traceback (most recent call last):

After installing anaconda you may notice an error when you execute pip list:

Brian-Feenys-Mac-Pro:~ bfeeny$ pip list
.
.
.
Exception:
Traceback (most recent call last):
File "/Users/bfeeny/anaconda/lib/python2.7/site-packages/pip/basecommand.py", line 134, in main
status = self.run(options, args)
File "/Users/bfeeny/anaconda/lib/python2.7/site-packages/pip/commands/list.py", line 80, in run
self.run_listing(options)
File "/Users/bfeeny/anaconda/lib/python2.7/site-packages/pip/commands/list.py", line 127, in run_listing
self.output_package_listing(installed_packages)
File "/Users/bfeeny/anaconda/lib/python2.7/site-packages/pip/commands/list.py", line 136, in output_package_listing
if dist_is_editable(dist):
File "/Users/bfeeny/anaconda/lib/python2.7/site-packages/pip/util.py", line 347, in dist_is_editable
req = FrozenRequirement.from_dist(dist, [])
File "/Users/bfeeny/anaconda/lib/python2.7/site-packages/pip/__init__.py", line 207, in from_dist
assert len(specs) == 1 and specs[0][0] == '=='
AssertionError

Storing complete log in /Users/bfeeny/.pip/pip.log

The issue has to do with the installation of distribute and can be fixed like so:

Brian-Feenys-Mac-Pro:~ bfeeny$ pip install -U distribute
Downloading/unpacking distribute from https://pypi.python.org/packages/source/d/distribute/distribute-0.7.3.zip#md5=c6c59594a7b180af57af8a0cc0cf5b4a
Downloading distribute-0.7.3.zip (145kB): 145kB downloaded
Running setup.py egg_info for package distribute

Downloading/unpacking setuptools>=0.7 (from distribute)
Downloading setuptools-1.3.2.tar.gz (789kB): 789kB downloaded
Running setup.py egg_info for package setuptools

Installing collected packages: setuptools, distribute
Found existing installation: distribute 0.6.45
Uninstalling distribute:
Successfully uninstalled distribute
Running setup.py install for setuptools

Installing easy_install script to /Users/bfeeny/anaconda/bin
Installing easy_install-2.7 script to /Users/bfeeny/anaconda/bin
Found existing installation: distribute 0.6.45
Uninstalling distribute:
Successfully uninstalled distribute
Running setup.py install for distribute

Successfully installed setuptools distribute

 

This entry was posted in Software Engineering and tagged , , . Bookmark the permalink.

Leave a Reply