Ubuntu – sudo pip install error

pippython

I'm currently using Ubuntu 12.04 with pip version 1.0 and python version 2.7.

pip --version
pip 1.0 from /usr/lib/python2.7/dist-packages (python 2.7)

Unfortunately, since trying to upgrade one of the pip packages, I'm unable to install anything using pip. I'm getting the following error messages:

vince@hal:~$ sudo pip install glances
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 126, in main
    self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 215, in run
    import setuptools
ImportError: No module named setuptools

Storing complete log in /home/vince/.pip/pip.log
vince@hal:~$ sudo pip install flexget
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 126, in main
    self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 215, in run
    import setuptools
ImportError: No module named setuptools

Storing complete log in /home/vince/.pip/pip.log
vince@hal:~$

Anyone got any ideas?

Best Answer

sudo apt-get install python-setuptools