python 当我尝试更新pip [重复]时,我得到异常

41zrol4v  于 2023-11-15  发布在  Python
关注(0)|答案(2)|浏览(99)

此问题在此处已有答案

ValueError: Unable to find resource t64.exe in package pip._vendor.distlib(3个答案)
7小时前关闭
当我试图从anaconda下载一个软件包时,它会像下面这样通知我。
“[注意]新版本的pip可用:23.1 -> 23.3.1 [注意]要更新,请运行:python.exe -m pip install --upgrade pip”
我已经复制了这个命令,并将其复制粘贴到我的anaconda提示符上,但我得到了一个异常。

ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\yoato\AppData\Roaming\Python\Python311\site-packages\pip\_internal\cli\base_command.py", line 169, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "C:\Users\yoato\AppData\Roaming\Python\Python311\site-packages\pip\_internal\cli\req_command.py", line 248, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\yoato\AppData\Roaming\Python\Python311\site-packages\pip\_internal\commands\install.py", line 449, in run
    installed = install_given_reqs(
                ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\yoato\AppData\Roaming\Python\Python311\site-packages\pip\_internal\req\__init__.py", line 72, in install_given_reqs
    requirement.install(
  File "C:\Users\yoato\AppData\Roaming\Python\Python311\site-packages\pip\_internal\req\req_install.py", line 800, in install
    install_wheel(
  File "C:\Users\yoato\AppData\Roaming\Python\Python311\site-packages\pip\_internal\operations\install\wheel.py", line 731, in install_wheel
    _install_wheel(
  File "C:\Users\yoato\AppData\Roaming\Python\Python311\site-packages\pip\_internal\operations\install\wheel.py", line 648, in _install_wheel
    generated_console_scripts = maker.make_multiple(scripts_to_generate)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\yoato\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\yoato\AppData\Roaming\Python\Python311\site-packages\pip\_internal\operations\install\wheel.py", line 429, in make
    return super().make(specification, options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\yoato\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\yoato\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\yoato\AppData\Roaming\Python\Python311\site-packages\pip\_vendor\distlib\scripts.py", line 249, in _write_script
    launcher = self._get_launcher('t')
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\yoato\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

字符串

i34xakig

i34xakig1#

试试看:

python -m pip uninstall pip setuptools

字符串
然后:

pip install --upgrade pip

vsaztqbk

vsaztqbk2#

键入以下命令:
python -m pip install --upgrade pip

相关问题