我一直在尝试将 pip 从 22.3.1 升级到 24.1.2,这是我收到的错误消息:
ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\Dsaxl\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\Dsaxl\AppData\Roaming\Python\Python311\site-packages\pip\_internal\cli\req_command.py", line 247, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Dsaxl\AppData\Roaming\Python\Python311\site-packages\pip\_internal\commands\install.py", line 494, in run
installed = install_given_reqs(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Dsaxl\AppData\Roaming\Python\Python311\site-packages\pip\_internal\req\__init__.py", line 73, in install_given_reqs
requirement.install(
File "C:\Users\Dsaxl\AppData\Roaming\Python\Python311\site-packages\pip\_internal\req\req_install.py", line 792, in install
install_wheel(
File "C:\Users\Dsaxl\AppData\Roaming\Python\Python311\site-packages\pip\_internal\operations\install\wheel.py", line 729, in install_wheel
_install_wheel(
File "C:\Users\Dsaxl\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\Dsaxl\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\Dsaxl\AppData\Roaming\Python\Python311\site-packages\pip\_internal\operations\install\wheel.py", line 427, in make
return super().make(specification, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Dsaxl\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\Dsaxl\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\Dsaxl\AppData\Roaming\Python\Python311\site-packages\pip\_vendor\distlib\scripts.py", line 249, in _write_script
launcher = self._get_launcher('t')
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Dsaxl\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
我无法升级它。它返回此错误。
感谢您的支持。
尝试
python -m pip uninstall pip
卸载pip,然后python -m ensurepip --upgrade
重新安装pip