You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

升级pip时触发ValueError异常:无法找到t64.exe资源

pip升级报错:ValueError: Unable to find resource t64.exe in package pip._vendor.distlib

问题场景

在Anaconda Prompt中执行pip升级命令python.exe -m pip install --upgrade pip时,触发如下报错:

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

解决方法

  • 强制重新安装指定版本的pip,避开可能存在问题的最新版本:
    python -m pip install pip==23.2.1 --force-reinstall
    
  • 清理pip缓存后重新尝试升级:
    python -m pip cache purge
    python -m pip install --upgrade pip
    
  • 重新安装distlib包修复资源缺失问题:
    python -m pip install --force-reinstall distlib
    
  • 利用conda管理工具升级pip(适配Anaconda环境):
    conda install pip
    

内容的提问来源于stack exchange,提问作者Yakup

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.06 12:56:19