Pip: Pip pkg_resources.DistributionNotFound error when I do anything with pip.

Created on 16 Nov 2017  路  8Comments  路  Source: pypa/pip

  • Pip version: Don't know, when I checked it gave me pkg_resources error
  • Python version: Python 2.7.10
  • Operating system: Mac OS Sierra

Description: Basically anything I try to install with pip I get the pkg_resources.DistributionNotFound error. Someone help please. 馃槃

What I've run:

$ pip install virtualenv
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in
from pkg_resources import load_entry_point
File "/usr/local/bin/pkg_resources/__init__.py", line 3142, in
@_call_aside
File "/usr/local/bin/pkg_resources/__init__.py", line 3126, in _call_aside
f(args, *kwargs)
File "/usr/local/bin/pkg_resources/__init__.py", line 3155, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/bin/pkg_resources/__init__.py", line 664, in _build_master
ws.require(__requires__)
File "/usr/local/bin/pkg_resources/__init__.py", line 981, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/bin/pkg_resources/__init__.py", line 867, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==9.0.1' distribution was not found and is required by the application

auto-locked support

Most helpful comment

Try "easy_install --upgrade pip".

All 8 comments

Try "easy_install --upgrade pip".

Got this:

$ easy_install --upgrade pip
Traceback (most recent call last):
File "/usr/bin/easy_install-2.7", line 7, in
from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

Hi @Timothyjackman!

You might want to ask this question on python-list (a mailing list) or on #python on Freenode (IRC). In all likelihood, you'll get a response there much faster than you'd get one here.

Ok, will do. Thank you!

@Timothyjackman Did you find a solution? I'm facing the same issue.

Went to freenode and got a solution there. Can鈥檛 remember what I did but go speak to peeps there.

Try "easy_install --upgrade pip".

work for me

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings