2

I upgraded to Ubuntu 16.04 and pip seems to be broken now. I am unable to install any package with it and even running commands such as pip -version or pip install -U pip, give me the same error message:

    Traceback (most recent call last):
  File "/usr/local/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2927, in <module>
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2913, in _call_aside
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 637, in _build_master
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 650, in _build_from_requirements
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 829, in resolve
pkg_resources.DistributionNotFound: The 'pip==1.5.4' distribution was not found and is required by the application

Is there a solution for this bug? How can I fix it?

2 Answers 2

3

I made pip work again like this. I tried:

sudo apt-get purge python-pip
sudo rm /usr/bin/pip /usr/local/bin/pip
sudo apt-get install python-pip

but then I was getting an error message saying usr/local/bin/pip not found so I created a symbolic link from /usr/local/bin/pip to /usr/bin/pip using:

sudo ln -s /usr/bin/pip /usr/local/bin/pip

and now pip works.

0

in my case, I got this error because pip packages were installed multiple times

I fixed this error fixed by removing rm /usr/local/bin/pip As pip was also found in ~/.local/bin/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .