Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Windows 10 update solution #8450

Closed
rowebyrowe opened this issue Jun 17, 2020 · 27 comments · Fixed by #10560
Closed

Document Windows 10 update solution #8450

rowebyrowe opened this issue Jun 17, 2020 · 27 comments · Fixed by #10560
Labels
state: awaiting PR Feature discussed, PR is needed type: docs Documentation related

Comments

@rowebyrowe
Copy link

Environment

  • pip version: 20.0.1
  • Python version: 3.7.6
  • OS: Windows 10

Description

I am trying to upgrade pip and while rolling back the uninstall of pip, it runs into an exception telling me that it can't find t64.exe in pip._vendor.distlib. I'm presuming that it means "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip_vendor\distlib". I checked that folder and found t64.exe there.
Expected behavior

Pip should upgrade without any errors and should be able to notice t64.exe.
How to Reproduce

1.Open command prompt in admin mode
2. type 'python -m pip install --upgrade pip'

Output

C:\WINDOWS\system32>python -m pip install --upgrade pip
Collecting pip
  Using cached pip-20.1.1-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.0.1
    Uninstalling pip-20.0.1:
      Successfully uninstalled pip-20.0.1
  Rolling back uninstall of pip
  Moving to c:\users\jeffr\appdata\roaming\python\python37\scripts\pip.exe
   from C:\Users\jeffr\AppData\Local\Temp\pip-uninstall-6f_5wl4x\pip.exe
  Moving to c:\users\jeffr\appdata\roaming\python\python37\scripts\pip3.7.exe
   from C:\Users\jeffr\AppData\Local\Temp\pip-uninstall-6f_5wl4x\pip3.7.exe
  Moving to c:\users\jeffr\appdata\roaming\python\python37\scripts\pip3.exe
   from C:\Users\jeffr\AppData\Local\Temp\pip-uninstall-6f_5wl4x\pip3.exe
  Moving to c:\users\jeffr\appdata\roaming\python\python37\site-packages\pip-20.0.1.dist-info\
   from c:\users\jeffr\appdata\roaming\python\python37\site-packages\~ip-20.0.1.dist-info
  Moving to c:\users\jeffr\appdata\roaming\python\python37\site-packages\pip\
   from c:\users\jeffr\appdata\roaming\python\python37\site-packages\~ip
ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_internal\cli\base_command.py", line 186, in _main
    status = self.run(options, args)
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_internal\commands\install.py", line 404, in run
    use_user_site=options.use_user_site,
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_internal\req\__init__.py", line 71, in install_given_reqs
    **kwargs
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_internal\req\req_install.py", line 815, in install
    warn_script_location=warn_script_location,
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_internal\operations\install\wheel.py", line 614, in install_wheel
    warn_script_location=warn_script_location,
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_internal\operations\install\wheel.py", line 548, in install_unpacked_wheel
    generated_console_scripts = maker.make_multiple(scripts_to_generate)
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\distlib\scripts.py", line 415, in make_multiple
    filenames.extend(self.make(specification, options))
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_internal\operations\install\wheel.py", line 280, in make
    return super(PipScriptMaker, self).make(specification, options)
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\distlib\scripts.py", line 404, in make
    self._make_script(entry, filenames, options=options)
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\distlib\scripts.py", line 304, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\distlib\scripts.py", line 239, in _write_script
    launcher = self._get_launcher('t')
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\distlib\scripts.py", line 383, in _get_launcher
    raise ValueError(msg)
ValueError: Unable to find resource t64.exe in package pip._vendor.distlib
WARNING: You are using pip version 20.0.1; however, version 20.1.1 is available.
You should consider upgrading via the 'C:\ProgramData\Anaconda3\python.exe -m pip install --upgrade pip' command.
@triage-new-issues triage-new-issues bot added the S: needs triage Issues/PRs that need to be triaged label Jun 17, 2020
@jku
Copy link
Contributor

jku commented Jun 17, 2020

@deveshks
Copy link
Contributor

I believe you might have a typo in the distlib path you shared in the issue (pip\_vendor instead of pip_vendor).

Also may I ask if the suggested command in the error message of upgrading through Anaconda via 'C:\ProgramData\Anaconda3\python.exe -m pip install --upgrade pip' works?

@deveshks
Copy link
Contributor

Related:
https://bitbucket.org/pypa/distlib/issues/123/attributeerror-nonetype-object-has-no
#6546

I believe there was an upgrade to the vendored distlib in #7618 where this particular error was addressed and changed to ValueError (https://bitbucket.org/pypa/distlib/commits/305a20488486d3c0f3cba4c6810442140ed2848e)

@safianabi
Copy link

Any luck with this error

Environment

  • pip version: 20.0.1
  • Python version: 3.7.6
  • OS: Windows 10

Description

I am trying to upgrade pip and while rolling back the uninstall of pip, it runs into an exception telling me that it can't find t64.exe in pip._vendor.distlib. I'm presuming that it means "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip_vendor\distlib". I checked that folder and found t64.exe there.
Expected behavior

Pip should upgrade without any errors and should be able to notice t64.exe.
How to Reproduce

1.Open command prompt in admin mode
2. type 'python -m pip install --upgrade pip'

Output

C:\WINDOWS\system32>python -m pip install --upgrade pip
Collecting pip
  Using cached pip-20.1.1-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.0.1
    Uninstalling pip-20.0.1:
      Successfully uninstalled pip-20.0.1
  Rolling back uninstall of pip
  Moving to c:\users\jeffr\appdata\roaming\python\python37\scripts\pip.exe
   from C:\Users\jeffr\AppData\Local\Temp\pip-uninstall-6f_5wl4x\pip.exe
  Moving to c:\users\jeffr\appdata\roaming\python\python37\scripts\pip3.7.exe
   from C:\Users\jeffr\AppData\Local\Temp\pip-uninstall-6f_5wl4x\pip3.7.exe
  Moving to c:\users\jeffr\appdata\roaming\python\python37\scripts\pip3.exe
   from C:\Users\jeffr\AppData\Local\Temp\pip-uninstall-6f_5wl4x\pip3.exe
  Moving to c:\users\jeffr\appdata\roaming\python\python37\site-packages\pip-20.0.1.dist-info\
   from c:\users\jeffr\appdata\roaming\python\python37\site-packages\~ip-20.0.1.dist-info
  Moving to c:\users\jeffr\appdata\roaming\python\python37\site-packages\pip\
   from c:\users\jeffr\appdata\roaming\python\python37\site-packages\~ip
ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_internal\cli\base_command.py", line 186, in _main
    status = self.run(options, args)
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_internal\commands\install.py", line 404, in run
    use_user_site=options.use_user_site,
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_internal\req\__init__.py", line 71, in install_given_reqs
    **kwargs
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_internal\req\req_install.py", line 815, in install
    warn_script_location=warn_script_location,
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_internal\operations\install\wheel.py", line 614, in install_wheel
    warn_script_location=warn_script_location,
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_internal\operations\install\wheel.py", line 548, in install_unpacked_wheel
    generated_console_scripts = maker.make_multiple(scripts_to_generate)
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\distlib\scripts.py", line 415, in make_multiple
    filenames.extend(self.make(specification, options))
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_internal\operations\install\wheel.py", line 280, in make
    return super(PipScriptMaker, self).make(specification, options)
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\distlib\scripts.py", line 404, in make
    self._make_script(entry, filenames, options=options)
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\distlib\scripts.py", line 304, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\distlib\scripts.py", line 239, in _write_script
    launcher = self._get_launcher('t')
  File "C:\Users\jeffr\AppData\Roaming\Python\Python37\site-packages\pip\_vendor\distlib\scripts.py", line 383, in _get_launcher
    raise ValueError(msg)
ValueError: Unable to find resource t64.exe in package pip._vendor.distlib
WARNING: You are using pip version 20.0.1; however, version 20.1.1 is available.
You should consider upgrading via the 'C:\ProgramData\Anaconda3\python.exe -m pip install --upgrade pip' command.

any luck with this error....suffering from same

@uranusjr uranusjr added the S: awaiting response Waiting for a response/more information label Aug 10, 2020
@uranusjr
Copy link
Member

Try upgrading pip.

@uranusjr uranusjr removed the S: needs triage Issues/PRs that need to be triaged label Aug 10, 2020
@vikash-jain
Copy link

Saw somewhere else on the web and tried following steps individually on the command prompt. It helped me move ahead. You can give it a try.

python -m pip uninstall pip
python -m ensurepip
python -m pip install -U pip

@KushSingla
Copy link

Saw somewhere else on the web and tried following steps individually on the command prompt. It helped me move ahead. You can give it a try.

python -m pip uninstall pip
python -m ensurepip
python -m pip install -U pip

I also got it solved using this one.
Thanks a lot @vikash-jain

@uranusjr uranusjr added type: support User Support and removed S: awaiting response Waiting for a response/more information labels Aug 18, 2020
@uranusjr
Copy link
Member

I’ll attribute this to a botched pip upgrade. Whatever the cause is seems to have not occured again. It would be nice if someone can submit a pull request to the documentation for future reference.

@00-kat
Copy link

00-kat commented Sep 1, 2020

The easiest way to upgrade pip: easy_install pip
It gives no errors, and it works.

@uranusjr
Copy link
Member

uranusjr commented Sep 1, 2020

The ensurepip approach is the most appropriate on Python 3. Use get-pip.py if ensurepip is not available (it should in most situations, including Python 2.7). Avoid using easy_install; it is deprecated, and setuptools maintainers want people to not use it (pypa/setuptools#1830).

@idbrii
Copy link

idbrii commented Sep 4, 2020

I'm getting the same error upgrading pip 20.0.2 to pip-20.2.2 (and Python 3.8.2) on Win10.

Tried to do some debugging.

Modifying resources.py and re-running the upgrade:

    def find(self, resource_name):
        path = self._make_path(resource_name)
        path_dir = os.path.dirname(path)
        print('DEBUG: ResourceFinder.find', path_dir, os.path.isdir(path_dir))
        print(os.listdir(path_dir))
        if not self._find(path):

I get this output:

...
    Uninstalling pip-20.0.2:
      Successfully uninstalled pip-20.0.2
DEBUG: ResourceFinder.find C:\Users\idbrii\AppData\Roaming\Python\Python38\site-packages\pip\_vendor\distlib True
['.resources.py.swp', '~backport', '~_pycache__']
  Rolling back uninstall of pip
...

So it seems that we're probably removing the contents of distlib during the uninstall but then trying to use them when installing pip.

That's likely fixed on newer version of pip?


I tried these steps to clean install pip but and last step failed:

python -m pip uninstall pip
python -m ensurepip
python -m pip install -U pip
> C:\Users\idbrii\scoop\apps\python\current\python.exe -m pip install --upgrade pip
C:\Users\idbrii\scoop\apps\python\current\python.exe: No module named pip.__main__; 'pip' is a package and cannot be directly executed

Re-running ensurepip showed I had an old 19.2.3 dist-info folder for pip:

> C:\Users\idbrii\scoop\apps\python\current\python.exe -m ensurepip
Looking in links: c:\Users\idbrii\AppData\Local\Temp\tmplf44e1tc
Requirement already satisfied: setuptools in c:\users\idbrii\scoop\apps\python\3.8.2\lib\site-packages (41.2.0)
Requirement already satisfied: pip in c:\users\idbrii\scoop\apps\python\3.8.2\lib\site-packages (19.2.3)

Deleting all the pip folders in C:\Users\idbrii\scoop\apps\python\3.8.2\lib\site-packages allowed me to use ensurepip to get a working pip install again!

@guidanoli
Copy link

Saw somewhere else on the web and tried following steps individually on the command prompt. It helped me move ahead. You can give it a try.

python -m pip uninstall pip
python -m ensurepip
python -m pip install -U pip

Thanks, that totally worked. I thought it was an Anaconda issue.

@plammens
Copy link

plammens commented Nov 24, 2020

I’ll attribute this to a botched pip upgrade. Whatever the cause is seems to have not occured again. It would be nice if someone can submit a pull request to the documentation for future reference.

I already had this issue before and solved it with the ensurepip method. I had to do this again to update to 20.2.4 (as in #9043), so this isn't a one-off, it looks like a persistent issue. In fact, now with the latest version of pip installed, if I do pip install -U pip again the error comes up again. So it seems no amount of uninstall > ensurepip > install will fix this issue.


Update: after drawing some inspiration from @idbrii's comment, even though I didn't have an outdated dist-info folder,

Deleting all the pip folders in C:\Users\idbrii\scoop\apps\python\3.8.2\lib\site-packages allowed me to use ensurepip to get a working pip install again!

I deleted all dist-info and egg folders for pip in my site-packages folder, re-ran python -m ensurepip and python -m pip install -U pip, and everything seems to work fine now.

@uranusjr
Copy link
Member

if I do pip install -U pip again

Does this happen with python -m pip install -U pip?

@plammens
Copy link

plammens commented Nov 24, 2020

if I do pip install -U pip again

Does this happen with python -m pip install -U pip?

Yes it also happened with the explicit command; but I've found another fix, see the update to my comment above. Sorry for the ping.

@mraxn
Copy link

mraxn commented Nov 26, 2020

Saw somewhere else on the web and tried following steps individually on the command prompt. It helped me move ahead. You can give it a try.

python -m pip uninstall pip
python -m ensurepip
python -m pip install -U pip

Worked like a charm!

@brainwane brainwane changed the title Can't update; missing t64.exe even though it is there Document Windows 10 update solution Nov 30, 2020
@brainwane brainwane added OS: windows Windows specific type: docs Documentation related labels Nov 30, 2020
@brainwane
Copy link
Contributor

@uranusjr wrote:

It would be nice if someone can submit a pull request to the documentation for future reference.

Thus I am reopening this issue as a docs issue. I suggest we add some notes on this within https://pip.pypa.io/en/stable/installing/#upgrading-pip .

@brainwane brainwane reopened this Nov 30, 2020
@brainwane brainwane added this to the 21.0 milestone Nov 30, 2020
@pfmoore
Copy link
Member

pfmoore commented Jan 9, 2021

A quick note. Pip 21.0 is due for release in about 2 weeks (see #9282). This item is on the 21.0 milestone, so it either needs to be implemented and merged to master before then, or it will miss the release (and I'll move it to the 21.1 milestone).

@uranusjr uranusjr added state: awaiting PR Feature discussed, PR is needed and removed OS: windows Windows specific type: support User Support labels Jan 9, 2021
@Sh4yneE
Copy link

Sh4yneE commented Feb 20, 2021

Saw somewhere else on the web and tried following steps individually on the command prompt. It helped me move ahead. You can give it a try.

python -m pip uninstall pip
python -m ensurepip
python -m pip install -U pip

I know this problem is (relatively) old, but... Thank you!! This totally solved the problem for me. 😄

@echomehran
Copy link

echomehran commented Jul 19, 2021

I have this issue with using and creating virtualenv module and also tried the solution below and now the pip doesn't work too and when I type pip in the command prompt it returns me >> pip is not recognized as an internal or external command

Saw somewhere else on the web and tried following steps individually on the command prompt. It helped me move ahead. You can give it a try.

python -m pip uninstall pip
python -m ensurepip
python -m pip install -U pip

type 'virtualenv venv'
output

RuntimeError: failed to build image wheel, pip because:
Traceback (most recent call last):
  File "c:\users\mehran\appdata\local\programs\python\python39\lib\site-packages\virtualenv\seed\embed\via_app_data\via_app_data.py", line 57, in _install
    installer.install(creator.interpreter.version_info)
  File "c:\users\mehran\appdata\local\programs\python\python39\lib\site-packages\virtualenv\seed\embed\via_app_data\pip_install\base.py", line 47, in install
    consoles.update(self._create_console_entry_point(name, module, script_dir, version_info))
  File "c:\users\mehran\appdata\local\programs\python\python39\lib\site-packages\virtualenv\seed\embed\via_app_data\pip_install\base.py", line 149, in _create_console_entry_point
    new_files = maker.make(specification)
  File "c:\users\mehran\appdata\local\programs\python\python39\lib\site-packages\distlib\scripts.py", line 411, in make
    self._make_script(entry, filenames, options=options)
  File "c:\users\mehran\appdata\local\programs\python\python39\lib\site-packages\distlib\scripts.py", line 312, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "c:\users\mehran\appdata\local\programs\python\python39\lib\site-packages\virtualenv\seed\embed\via_app_data\pip_install\base.py", line 173, in _write_script
    super(ScriptMakerCustom, self)._write_script(names, shebang, script_bytes, filenames, ext)
  File "c:\users\mehran\appdata\local\programs\python\python39\lib\site-packages\distlib\scripts.py", line 242, in _write_script
    launcher = self._get_launcher('t')
  File "c:\users\mehran\appdata\local\programs\python\python39\lib\site-packages\distlib\scripts.py", line 390, in _get_launcher
    raise ValueError(msg)
ValueError: Unable to find resource t64.exe in package distlib

Traceback (most recent call last):
  File "c:\users\mehran\appdata\local\programs\python\python39\lib\site-packages\virtualenv\seed\embed\via_app_data\via_app_data.py", line 57, in _install
    installer.install(creator.interpreter.version_info)
  File "c:\users\mehran\appdata\local\programs\python\python39\lib\site-packages\virtualenv\seed\embed\via_app_data\pip_install\base.py", line 47, in install
    consoles.update(self._create_console_entry_point(name, module, script_dir, version_info))
  File "c:\users\mehran\appdata\local\programs\python\python39\lib\site-packages\virtualenv\seed\embed\via_app_data\pip_install\base.py", line 149, in _create_console_entry_point
    new_files = maker.make(specification)
  File "c:\users\mehran\appdata\local\programs\python\python39\lib\site-packages\distlib\scripts.py", line 411, in make
    self._make_script(entry, filenames, options=options)
  File "c:\users\mehran\appdata\local\programs\python\python39\lib\site-packages\distlib\scripts.py", line 312, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "c:\users\mehran\appdata\local\programs\python\python39\lib\site-packages\virtualenv\seed\embed\via_app_data\pip_install\base.py", line 173, in _write_script
    super(ScriptMakerCustom, self)._write_script(names, shebang, script_bytes, filenames, ext)
  File "c:\users\mehran\appdata\local\programs\python\python39\lib\site-packages\distlib\scripts.py", line 242, in _write_script
    launcher = self._get_launcher('t')
  File "c:\users\mehran\appdata\local\programs\python\python39\lib\site-packages\distlib\scripts.py", line 390, in _get_launcher
    raise ValueError(msg)
ValueError: Unable to find resource t64.exe in package distlib

@hadismasihi
Copy link

Saw somewhere else on the web and tried following steps individually on the command prompt. It helped me move ahead. You can give it a try.

python -m pip uninstall pip
python -m ensurepip
python -m pip install -U pip

Worked like a charm!

It was successful for me

@pranavmarla
Copy link

pranavmarla commented Aug 17, 2021

FYI, I ran into this same issue when attempting to upgrade pip (on Windows 10) from v21.1.2 to v21.2.4:

> python -m pip install --upgrade pip
Requirement already satisfied: pip in c:\users\...\appdata\roaming\python\python39\site-packages (21.1.2)
Collecting pip
  Using cached pip-21.2.4-py3-none-any.whl (1.6 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.1.2
    Uninstalling pip-21.1.2:
      Successfully uninstalled pip-21.1.2
  Rolling back uninstall of pip
  Moving to c:\users\...\appdata\roaming\python\python39\scripts\pip.exe
   from C:\Users\...\AppData\Local\Temp\pip-uninstall-p62aggd4\pip.exe
  Moving to c:\users\...\appdata\roaming\python\python39\scripts\pip3.9.exe
   from C:\Users\...\AppData\Local\Temp\pip-uninstall-p62aggd4\pip3.9.exe
  Moving to c:\users\...\appdata\roaming\python\python39\scripts\pip3.exe
   from C:\Users\...\AppData\Local\Temp\pip-uninstall-p62aggd4\pip3.exe
  Moving to c:\users\...\appdata\roaming\python\python39\site-packages\pip-21.1.2.dist-info\
   from C:\Users\...\AppData\Roaming\Python\Python39\site-packages\~ip-21.1.2.dist-info
  Moving to c:\users\...\appdata\roaming\python\python39\site-packages\pip\
   from C:\Users\...\AppData\Roaming\Python\Python39\site-packages\~ip
ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\...\AppData\Roaming\Python\Python39\site-packages\pip\_internal\cli\base_command.py", line 180, in _main
    status = self.run(options, args)
  File "C:\Users\...\AppData\Roaming\Python\Python39\site-packages\pip\_internal\cli\req_command.py", line 204, in wrapper
    return func(self, options, args)
  File "C:\Users\...\AppData\Roaming\Python\Python39\site-packages\pip\_internal\commands\install.py", line 393, in run
    installed = install_given_reqs(
  File "C:\Users\...\AppData\Roaming\Python\Python39\site-packages\pip\_internal\req\__init__.py", line 77, in install_given_reqs
    requirement.install(
  File "C:\Users\...\AppData\Roaming\Python\Python39\site-packages\pip\_internal\req\req_install.py", line 801, in install
    install_wheel(
  File "C:\Users\...\AppData\Roaming\Python\Python39\site-packages\pip\_internal\operations\install\wheel.py", line 810, in install_wheel
    _install_wheel(
  File "C:\Users\...\AppData\Roaming\Python\Python39\site-packages\pip\_internal\operations\install\wheel.py", line 720, in _install_wheel
    generated_console_scripts = maker.make_multiple(scripts_to_generate)
  File "C:\Users\...\AppData\Roaming\Python\Python39\site-packages\pip\_vendor\distlib\scripts.py", line 418, in make_multiple
    filenames.extend(self.make(specification, options))
  File "C:\Users\...\AppData\Roaming\Python\Python39\site-packages\pip\_internal\operations\install\wheel.py", line 462, in make
    return super().make(specification, options)
  File "C:\Users\...\AppData\Roaming\Python\Python39\site-packages\pip\_vendor\distlib\scripts.py", line 407, in make
    self._make_script(entry, filenames, options=options)
  File "C:\Users\...\AppData\Roaming\Python\Python39\site-packages\pip\_vendor\distlib\scripts.py", line 307, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "C:\Users\...\AppData\Roaming\Python\Python39\site-packages\pip\_vendor\distlib\scripts.py", line 242, in _write_script
    launcher = self._get_launcher('t')
  File "C:\Users\...\AppData\Roaming\Python\Python39\site-packages\pip\_vendor\distlib\scripts.py", line 386, in _get_launcher
    raise ValueError(msg)
ValueError: Unable to find resource t64.exe in package pip._vendor.distlib
WARNING: You are using pip version 21.1.2; however, version 21.2.4 is available.
You should consider upgrading via the 'C:\Program Files\Python39\python.exe -m pip install --upgrade pip' command.

And, just like everyone else, this solution worked for me:

python -m pip uninstall pip
python -m ensurepip
python -m pip install -U pip

> python -m pip uninstall pip
Found existing installation: pip 21.1.2
Uninstalling pip-21.1.2:
  Would remove:
    c:\users\...\appdata\roaming\python\python39\scripts\pip.exe
    c:\users\...\appdata\roaming\python\python39\scripts\pip3.9.exe
    c:\users\...\appdata\roaming\python\python39\scripts\pip3.exe
    c:\users\...\appdata\roaming\python\python39\site-packages\pip-21.1.2.dist-info\*
    c:\users\...\appdata\roaming\python\python39\site-packages\pip\*
Proceed (y/n)? y
  Successfully uninstalled pip-21.1.2

> python -m ensurepip
Looking in links: c:\Users\...\AppData\Local\Temp\tmp4xpjz0b7
Requirement already satisfied: setuptools in c:\program files\python39\lib\site-packages (49.2.1)
Requirement already satisfied: pip in c:\program files\python39\lib\site-packages (21.2.4)

> python -m pip install --upgrade pip
Requirement already satisfied: pip in c:\program files\python39\lib\site-packages (21.2.4)

> pip --version
pip 21.2.4 from c:\program files\python39\lib\site-packages\pip (python 3.9)

@sjunaidhere
Copy link

Saw somewhere else on the web and tried following steps individually on the command prompt. It helped me move ahead. You can give it a try.

python -m pip uninstall pip
python -m ensurepip
python -m pip install -U pip

OMG this helped, thanks

@Sunspire
Copy link

Saw somewhere else on the web and tried following steps individually on the command prompt. It helped me move ahead. You can give it a try.

python -m pip uninstall pip
python -m ensurepip
python -m pip install -U pip

Thanks @mraxn

@pradyunsg
Copy link
Member

Alrighty. Fun. The "protect pip from modification" logic had a bug, that should get fixed in #10560. :)

@alan-isaac
Copy link

Saw somewhere else on the web and tried following steps individually on the command prompt. It helped me move ahead. You can give it a try.

python -m pip uninstall pip
python -m ensurepip
python -m pip install -U pip

Just used this to solve the same problem, updating from 21.1.2 to 21.3. Thanks!

@aiforkids
Copy link

Saw somewhere else on the web and tried following steps individually on the command prompt. It helped me move ahead. You can give it a try.

python -m pip uninstall pip
python -m ensurepip
python -m pip install -U pip

It works for me, thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
state: awaiting PR Feature discussed, PR is needed type: docs Documentation related
Projects
None yet