The 'pip==9.0.3' distribution was not found and is required by the application

I have the latest version of pip in my laptop.I always get this error when I install any modules using pip.

Traceback (most recent call last): File "/usr/local/bin/pip", line 6, in <module> from pkg_resources import load_entry_point File "/usr/local/lib/python2.7/site- packages/pkg_resources/__init__.py", line 3195, in <module> @_call_aside File "/usr/local/lib/python2.7/site- packages/pkg_resources/__init__.py", line 3179, in _call_aside f(*args, **kwargs) File "/usr/local/lib/python2.7/site-p packages/pkg_resources/__init__.py", line 3208, in _ initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/local/lib/python2.7/site- packages/pkg_resources/__init__.py", line 681, in _build_master ws.require(__requires__) File "/usr/local/lib/python2.7/site- packages/pkg_resources/__init__.py", line 999, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/local/lib/python2.7/site- packages/pkg_resources/__init__.py", line 885, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'pip==9.0.3' distribution was not found and is required by the application 

How do I resolve this error.

3 Answers

Most likely your pip crashed due to missing dependencies. Try reinstalling pip.

sudo easy_install pip==9.0.3

i was facing the same problem you had. But after 3 hour of surfing the internet, i found the solution. Use

python -m pip

command to run pip.

When you want to install a new modules,

python -m pip install "modules name"

This will solve your problem!!

2

It looks like you're using Homebrew. If so, what worked for me was running brew reinstall python. That brought in a clean copy of pip.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like