When I try to use pip, I met this error:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==1.0.2', 'console_scripts', 'pip')()
File "/usr/local/lib/python2.6/dist-packages/distribute-0.6.21-py2.6.egg/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.6/dist-packages/distribute-0.6.21-py2.6.egg/pkg_resources.py", line 2281, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.6/dist-packages/distribute-0.6.21-py2.6.egg/pkg_resources.py", line 1996, in load
raise ImportError("%r has no %r attribute" % (entry,attr))
ImportError: <module 'pip' from '/usr/lib/pymodules/python2.6/pip/__init__.pyc'> has no 'main' attribute
Obviously, I made some change to the system that broke pip. But I've no idea what it is. What might cause the exception above?
Edit:
What I can guess is that this morning, I crated a virtualenv, installed a package written by myself by running:
python setup.py install
in that environment.
BTW, I did try to reinstall pip by running get-pip.py, didn't work
Reinstall using easy_install. Close the terminal and reopen. Pip should now work.
I note that distribute is installed in
/usr/local
but pip is in/usr/lib
, so I'm guessing that you have an older version of pip installed system wide that is somehow overriding what you'reeasy_install
ed orpip
ed. I'd start looking there.