0

I started a few Debian vagrant boxes. After executing pip install --upgrade pip, the pip command stopped working.

root@debian6010-db1:/vagrant# pip install Jinja2
Traceback (most recent call last):
  File "/usr/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

Somehow I fixed the issue on one of my machines. But the issue persists on the rest. I had the same problem on Ubuntu vagrant boxes. pip broke.

Prachi
  • 511
  • 6
  • 24
  • Have you considered the configuration of Python on the environment? Also are you using Python 2 or 3? It could be a number of reasons. – Richard Kenneth Niescior Oct 20 '15 at 22:02
  • did you try this? http://stackoverflow.com/questions/7446187/no-module-named-pkg-resources – John Mee Oct 20 '15 at 22:03
  • I am using python 2.7 – Prachi Oct 21 '15 at 15:19
  • I tried `wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python`. And that did fix pip. But as soon as I run `pip install --upgrade pip` again, I get the following error `root@ubuntu-lb:/home/vagrant# pip install Jinja2 bash: /usr/bin/pip: No such file or directory`. And that is frustrating. I should be able to update pip without breaking it. – Prachi Oct 21 '15 at 15:49

1 Answers1

-2

Purging and reinstalling might be your best option

sudo apt-get purge python-pip

russOnXMaps
  • 119
  • 10