首页 / 故障排查 / 解决升级pip报错,Unable to find resource t64.exe in package pip._vendor.distlib

解决升级pip报错,Unable to find resource t64.exe in package pip._vendor.distlib

2024-12-26 13:46:14故障排查 阅读 617
升级pip出现错误不是很奇怪,但解决方法很神奇,收藏一下。
python -m pip install --upgrade --no-cache-dir pip
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: pip in c:\users\admin\appdata\roaming\python\python310\site-packages (24.0)
Collecting pip
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ef/7d/500c9ad20238fcfcb4cb9243eede163594d7020ce87bd9610c9e02771876/pip-24.3.1-py3-none-any.whl (1.8 MB)
     ---------------------------------------- 1.8/1.8 MB 626.8 kB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 24.0
    Uninstalling pip-24.0:
      Successfully uninstalled pip-24.0
  Rolling back uninstall of pip
  Moving to c:\users\admin\appdata\roaming\python\python310\scripts\pip.exe
   from C:\Users\admin\AppData\Local\Temp\pip-uninstall-fkguui0m\pip.exe
  Moving to c:\users\admin\appdata\roaming\python\python310\scripts\pip3.10.exe
   from C:\Users\admin\AppData\Local\Temp\pip-uninstall-fkguui0m\pip3.10.exe
  Moving to c:\users\admin\appdata\roaming\python\python310\scripts\pip3.exe
   from C:\Users\admin\AppData\Local\Temp\pip-uninstall-fkguui0m\pip3.exe
  Moving to c:\users\admin\appdata\roaming\python\python310\site-packages\pip-24.0.dist-info\
   from C:\Users\admin\AppData\Roaming\Python\Python310\site-packages\~ip-24.0.dist-info
  Moving to c:\users\admin\appdata\roaming\python\python310\site-packages\pip\
   from C:\Users\admin\AppData\Roaming\Python\Python310\site-packages\~ip
ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\admin\AppData\Roaming\Python\Python310\site-packages\pip\_internal\cli\base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
  File "C:\Users\admin\AppData\Roaming\Python\Python310\site-packages\pip\_internal\cli\req_command.py", line 245, in wrapper
    return func(self, options, args)
  File "C:\Users\admin\AppData\Roaming\Python\Python310\site-packages\pip\_internal\commands\install.py", line 452, in run
    installed = install_given_reqs(
  File "C:\Users\admin\AppData\Roaming\Python\Python310\site-packages\pip\_internal\req\__init__.py", line 72, in install_given_reqs
    requirement.install(
  File "C:\Users\admin\AppData\Roaming\Python\Python310\site-packages\pip\_internal\req\req_install.py", line 856, in install
    install_wheel(
  File "C:\Users\admin\AppData\Roaming\Python\Python310\site-packages\pip\_internal\operations\install\wheel.py", line 725, in install_wheel
    _install_wheel(
  File "C:\Users\admin\AppData\Roaming\Python\Python310\site-packages\pip\_internal\operations\install\wheel.py", line 642, in _install_wheel
    generated_console_scripts = maker.make_multiple(scripts_to_generate)
  File "C:\Users\admin\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\distlib\scripts.py", line 451, in make_multiple
    filenames.extend(self.make(specification, options))
  File "C:\Users\admin\AppData\Roaming\Python\Python310\site-packages\pip\_internal\operations\install\wheel.py", line 423, in make
    return super().make(specification, options)
  File "C:\Users\admin\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\distlib\scripts.py", line 440, in make
    self._make_script(entry, filenames, options=options)
  File "C:\Users\admin\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\distlib\scripts.py", line 339, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "C:\Users\admin\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\distlib\scripts.py", line 260, in _write_script
    launcher = self._get_launcher('t')
  File "C:\Users\admin\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\distlib\scripts.py", line 419, in _get_launcher
    raise ValueError(msg)
ValueError: Unable to find resource t64.exe in package pip._vendor.distlib

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

(sdwebui) >python -m pip install --user --upgrade pip
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: pip in c:\users\admin\appdata\roaming\python\python310\site-packages (24.0)
Collecting pip
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ef/7d/500c9ad20238fcfcb4cb9243eede163594d7020ce87bd9610c9e02771876/pip-24.3.1-py3-none-any.whl (1.8 MB)
     ---------------------------------------- 1.8/1.8 MB 1.0 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 24.0
    Uninstalling pip-24.0:
      Successfully uninstalled pip-24.0
  WARNING: The scripts pip.exe, pip3.10.exe and pip3.exe are installed in 'C:\Users\admin\AppData\Roaming\Python\Python310\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-24.3.1

正常升级一直失败:python -m pip install --upgrade --no-cache-dir pip ,

更换为python -m pip install --user --upgrade pip 成功了。

使用 python -m pip install --user --upgrade pip 成功的原因主要有以下几点:

用户权限:--user 选项会将 pip 安装到用户目录,而不是全局系统目录。这样可以避免因为权限不足而导致的安装问题。
避免冲突:如果系统中有多个 Python 安装或 pip 版本,使用 --user 可以确保你正在更新用户环境中的 pip,而不是系统环境中的 pip,从而减少潜在的冲突。
环境隔离:将 pip 安装到用户目录可以避免与系统全局环境中的库发生冲突,特别是在一些权限受限的环境中。
简单安全:在没有管理员权限的情况下,使用 --user 选项是一个安全的选择,因为它不会影响其他用户的环境

参考:https://blog.csdn.net/poorlytechnology/article/details/110914472

本文《解决升级pip报错,Unable to find resource t64.exe in package pip._vendor.distlib》由爱思考吧 isres.com 分享,转载请注明出处。本文网址:https://www.isres.com/jingyan2/t64exe.html

本站主要收集测评能够节省时间和提升效率的软件工具并分享使用与学习的过程和感受,任何情况下用户都需遵守所使用软件资源的相关协议。与《解决升级pip报错,Unable to find resource t64.exe in package pip._vendor.distlib》有关的本站文章及资源仅供个人学习交流使用,相关资源请下载后24小时内删除,请勿用于其它用途,因此产生的任何问题由您自行承担。

猜你喜欢

  • 升级DellR430 bios以点亮V4CPU

    升级DellR430 bios以点亮V4CPU

    有一台以前买的R430服务器,原来安装的E5-2620V3 CPU,相升级换成 E5-2680V4 。 无奈发现开机后一直卡在,Configuring Memory…Done ,换回V3 CPU就正常...

    2023-04-20 16:25:30 2727
  • PHP CURL POST请求返回 400 Bad Request的处理

    某套代码,都是linux,只是换了一台,换了php环境。 运行CURL POST请求返回 400 Bad Request。 经过验证排查,原因虽然使用POST,但我们的参数是在URL后边拼接的。 解决...

    2023-04-25 12:11:30 1463
  • 解决html元素上style的设置被样式表中的设置覆盖

    解决html元素上style的设置被样式表中的设置覆盖

    一般情况下,我们在页面代码上的html原色设置的样式效果是最优先的,比如 页面代码 <div class="a1" style="width:10px;"></div> 样式...

    2023-06-17 10:11:28 1389
  • 解决vs2012等老版软件安装sqlite数据库驱动出现版本不兼容的问题

    解决vs2012等老版软件安装sqlite数据库驱动出现版本不兼容的问题

    首先解决联网问题,以上截图也是联网之后才得以搜索出结果。 启动NuGet控制台 菜单“工具” - “库程序包管理器”-“库程序员管理器控制台” ,之后在vs软件底部会出现控制台 键入“get-hel...

    2024-03-22 15:51:20 1234
  • 解决autodl的GPU服务器Ubuntu vim中文乱码

    解决autodl的GPU服务器Ubuntu vim中文乱码

    为了微调chatbml3 6b,租了台3090的服务器,而且直接使用的社区镜像。 本次出现汉字乱码的系统版本如下 cat /proc/version Linux version 5.15.0-57-...

    2024-08-12 18:27:16 1024
  • php编译exif.so,解决Call to undefined exif_imagetype()报错

    如果php是编译安装,找到或重新下载源码,进到exif目录,比如 /usr/tmp/php-7.2.1/ext/exif /usr/local/php/bin/phpize ./confi...

    2023-04-26 14:23:39 970
  • 设置xshell断开自动重连的方法

    设置xshell断开自动重连的方法

    有时候xshell挂机做一些任务,由于网络不稳定,尤其是我们这种家用宽带时不是跳一下公网IP导致连接异常,xshell经常没过多久就断开了,麻烦的很。 关于这个问题首先问了一个AI, AI一本正经胡...

    2023-05-30 08:21:46 1225
  • u盘安装Centos7报starting timeout scripts错误

    这个问题出现两次,有必要记录一下了。 就是需要在显示 安装界面 。 install centos 和 test mdeia 的界面上。 按一下tab,修改一个路径 按网上说的,就是WIN10刻录才这样...

    2023-04-25 12:14:43 1021