Getting an error while trying to install distutiles in order to use py2exe "pkg_resources.DistributionNotFound"

Question:

Traceback (most recent call last):
  File "C:UsersFalconDesktopuntitled3Scriptspip-script.py", line 6, in <module>
    from pkg_resources import load_entry_point
  File "C:UsersFalconAppDataLocalProgramsPythonPython37-32libsite-packagespkg_resources__init__.py", line 3088, in <module>
    @_call_aside
  File "C:UsersFalconAppDataLocalProgramsPythonPython37-32libsite-packagespkg_resources__init__.py", line 3072, in _call_aside
    f(*args, **kwargs)
  File "C:UsersFalconAppDataLocalProgramsPythonPython37-32libsite-packagespkg_resources__init__.py", line 3101, in _initialize_master_workin
g_set
    working_set = WorkingSet._build_master()
  File "C:UsersFalconAppDataLocalProgramsPythonPython37-32libsite-packagespkg_resources__init__.py", line 576, in _build_master
    return cls._build_from_requirements(__requires__)
  File "C:UsersFalconAppDataLocalProgramsPythonPython37-32libsite-packagespkg_resources__init__.py", line 589, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "C:UsersFalconAppDataLocalProgramsPythonPython37-32libsite-packagespkg_resources__init__.py", line 778, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==19.0.3' distribution was not found and is required by the application

Got this when I was running

pip install distutiles

I need this to run py2exe so any help is appreciated.

Asked By: Xendex

||

Answers:

try updating pip with

pip install -U pip

It looks like your problem is that you have an older version of pip

Answered By: mark pedersen

For me, upgrading pip with

sudo python -m pip install --upgrade pip

did the trick.

Answered By: Felix Kemeth
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.