Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error on "pip install --upgrade distribute"

Installed python via homebrew as such:

brew install python --universal --framework

Followed the instructions over at https://github.com/mxcl/homebrew/wiki/Homebrew-and-Python to install pip and upgrade distribute. pip install appeared to go fine, but whenever I try to use pip to upgrade distribute or install virtualenv as such

pip install --upgrade distribute

or

pip install virtualenv

I get the following error:

Traceback (most recent call last): File "/usr/local/bin/pip", line 5, in from pkg_resources import load_entry_point File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in working_set.require(requires) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require needed = self.resolve(parse_requirements(requirements)) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve raise DistributionNotFound(req) # XXX put more info here pkg_resources.DistributionNotFound: pip==1.0.2

Not proficient enough in python to know what is going on here so if anyone knows how to correct this it would be appreciated.

My $PATH looks like this:

/Users/wg/.rvm/gems/ruby-1.9.3-p125@rails3_2/bin:/Users/wg/.rvm/gems/ruby-1.9.3-p125@global/bin:/Users/wg/.rvm/rubies/ruby-1.9.3-p125/bin:/Users/wg/.rvm/bin:/usr/local/bin:/usr/local/share/python:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin

... and when I run which pip I get /usr/local/bin/pip (not sure if this is the problem and if so, what to do to get it to use the right version of pip).

EDIT:

Wanted to include that I'm running Lion OS 10.7 with the latest build of XCode and the Command utilities installed. Also, don't know if this helps, but I thought I'd include the results of running "which easy_install" as well ... returns:

/usr/local/share/python/easy_install

Not sure if that is perhaps related as well.


Thanks much!

like image 818
wgpubs Avatar asked Oct 07 '22 11:10

wgpubs


1 Answers

I practice, I find running

pip install --upgrade setuptools

before

pip install --upgrade distribute
pip install --upgrade pip

solves my problem when running pip install --upgrade distribute.

like image 84
qazwsx Avatar answered Oct 12 '22 11:10

qazwsx