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

Unable to find resource t64.exe in package pip._vendor.distlib #11772

Closed
1 task done
randalhucker opened this issue Feb 2, 2023 · 4 comments
Closed
1 task done

Unable to find resource t64.exe in package pip._vendor.distlib #11772

randalhucker opened this issue Feb 2, 2023 · 4 comments
Labels
type: bug A confirmed bug or unintended behavior

Comments

@randalhucker
Copy link

Description

When running "python.exe -m pip install --upgrade pip", on python 3.11.1 I get the value error: Unable to find resource t64.exe in package pip._vendor.distlib.

image

Expected behavior

Pip should be updated to the most recent version available.

pip version

22.3.1

Python version

3.11.1

OS

Windows 10 Pro 22H2

How to Reproduce

  • open CMD w/ admin privileges
  • attempt to run "python.exe -m pip install --upgrade pip"

Output

Requirement already satisfied: pip in c:\users\randa\appdata\roaming\python\python311\site-packages (22.3.1)
Collecting pip
Using cached pip-23.0-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 22.3.1
Uninstalling pip-22.3.1:
Successfully uninstalled pip-22.3.1
Rolling back uninstall of pip
Moving to c:\users\randa\appdata\roaming\python\python311\scripts
from C:\Users\randa\AppData\Roaming\Python\Python311~cripts
Moving to c:\users\randa\appdata\roaming\python\python311\site-packages\pip-22.3.1.dist-info
from C:\Users\randa\AppData\Roaming\Python\Python311\site-packages~ip-22.3.1.dist-info
Moving to c:\users\randa\appdata\roaming\python\python311\site-packages\pip
from C:\Users\randa\AppData\Roaming\Python\Python311\site-packages~ip
ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\randa\AppData\Roaming\Python\Python311\site-packages\pip_internal\cli\base_command.py", line 160, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File "C:\Users\randa\AppData\Roaming\Python\Python311\site-packages\pip_internal\cli\req_command.py", line 247, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\randa\AppData\Roaming\Python\Python311\site-packages\pip_internal\commands\install.py", line 494, in run
installed = install_given_reqs(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\randa\AppData\Roaming\Python\Python311\site-packages\pip_internal\req_init_.py", line 73, in install_given_reqs
requirement.install(
File "C:\Users\randa\AppData\Roaming\Python\Python311\site-packages\pip_internal\req\req_install.py", line 792, in install
install_wheel(
File "C:\Users\randa\AppData\Roaming\Python\Python311\site-packages\pip_internal\operations\install\wheel.py", line 729, in install_wheel
_install_wheel(
File "C:\Users\randa\AppData\Roaming\Python\Python311\site-packages\pip_internal\operations\install\wheel.py", line 646, in _install_wheel
generated_console_scripts = maker.make_multiple(scripts_to_generate)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\randa\AppData\Roaming\Python\Python311\site-packages\pip_vendor\distlib\scripts.py", line 436, in make_multiple
filenames.extend(self.make(specification, options))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\randa\AppData\Roaming\Python\Python311\site-packages\pip_internal\operations\install\wheel.py", line 427, in make
return super().make(specification, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\randa\AppData\Roaming\Python\Python311\site-packages\pip_vendor\distlib\scripts.py", line 425, in make
self._make_script(entry, filenames, options=options)
File "C:\Users\randa\AppData\Roaming\Python\Python311\site-packages\pip_vendor\distlib\scripts.py", line 325, in _make_script
self._write_script(scriptnames, shebang, script, filenames, ext)
File "C:\Users\randa\AppData\Roaming\Python\Python311\site-packages\pip_vendor\distlib\scripts.py", line 249, in _write_script
launcher = self._get_launcher('t')
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\randa\AppData\Roaming\Python\Python311\site-packages\pip_vendor\distlib\scripts.py", line 404, in _get_launcher
raise ValueError(msg)
ValueError: Unable to find resource t64.exe in package pip._vendor.distlib

[notice] A new release of pip available: 22.3.1 -> 23.0
[notice] To update, run: python.exe -m pip install --upgrade pip

Code of Conduct

@randalhucker randalhucker added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Feb 2, 2023
@caseybasichis
Copy link

Same issue here.

@SnoopJ
Copy link
Contributor

SnoopJ commented Feb 19, 2023

I believe this is the same issue as #11349

@Fohsap
Copy link

Fohsap commented Feb 19, 2023

This was solved on my side by running these commands:

python -m uninstall pip

And then it might work!

python -m pip install --upgrade

KEEP READING!!!

But if not, then you need to run the uninstaller again and again, repeatedly, until all versions (or at least only one version) are uninstalled.

python -m uninstall pip
python -m uninstall pip
python -m uninstall pip

KEEP READING!!!

This error seems to occur because the updater uninstalls pip and then tries to install it, but if there are two versions in the path, it thinks that the uninstallation did not succeed, and it undoes everything (reverting the uninstalled version back to its directory). So no matter how many times you try to update, it fails and fails.

If you only have one version of pip, you can just run the update command; otherwise, you need to get get-pip: https://bootstrap.pypa.io/get-pip.py and save it and run this command:

py get-pip.py

ALSO:
Prior to doing this, I uninstalled all versions of python and reinstalled the latest version.... and that failed to resolve the problem! But it may have contributed to the success, so you might have to do that.

ALSO:
I got this error when trying to upgrade yt-dlp, and here is that command, for convenience:
pip install --upgrated yt-dlp

@pradyunsg
Copy link
Member

Closing as a duplicate of #11349

@pradyunsg pradyunsg removed the S: needs triage Issues/PRs that need to be triaged label Mar 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

5 participants