Ciaran Ciaran - 1 year ago 276
Python Question

ImportError: No module named pip when trying to install packages

Have a fresh install of Ubuntu 13.10 with PyCharm and when setting up the python interpreter I selected 'install setuptools', then 'install pip'. Now if I try and do anything with pip I get the following:

ciaran@ciaran-desktop:~/pycharm/bin$ pip
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==1.4.1', 'console_scripts', 'pip')()
File "build/bdist.linux-x86_64/egg/", line 357, in load_entry_point
"""Does the package's distribution contain the named metadata?"""
File "build/bdist.linux-x86_64/egg/", line 2394, in load_entry_point

File "build/bdist.linux-x86_64/egg/", line 2108, in load

ImportError: No module named pip

I have tried on python 2.7.5 and 3.3.2 and both yield the same results.

Edit: The above output is from the terminal. PyCharm outputs the following:

Error: Python package management tool 'pip' not found

Answer Source

I found that on Ubuntu, pip will not always set read permissions for the modules it installs. My solution is to always run this shell script:

sudo chmod -R a+rX /usr/local/lib/python2.7/dist-packages/
sudo chmod -R a+rX /usr/local/lib/python3.3/dist-packages/