pip install 出现ERROR: Cannot uninstall 'xxx'.

本文详细介绍了在Python环境中遇到的包安装冲突问题,特别是当尝试安装包含pyserial, MAVProxy和catkin-pkg在内的多个包时,如何处理已存在的pyserial版本导致的卸载错误。文章提供了直接在install命令后添加-I参数以忽略已有安装包并重写的方法,但同时也警告了这种操作可能带来的系统风险。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Installing collected packages: pyserial, MAVProxy, catkin-pkg
Attempting uninstall: pyserial
Found existing installation: pyserial 2.6
ERROR: Cannot uninstall ‘pyserial’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

直接在install 后面添 -I 忽略已有安装包,重写
Ignore the installed packages, overwriting them.
This can break your system if the existing
package is of a different version or was
installed with a different package manager!

运行后提示2025-06-09 09:42:30.247883572 [E:onnxruntime:Default, provider_bridge_ort.cc:2195 TryGetProviderInfo_CUDA] /onnxruntime_src/onnxruntime/core/session/provider_bridge_ort.cc:1778 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcublasLt.so.12: cannot open shared object file: No such file or directory 2025-06-09 09:42:30.247901516 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:1055 CreateExecutionProviderInstance] Failed to create CUDAExecutionProvider. Require cuDNN 9.* and CUDA 12.*. Please install all dependencies as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported. 2025-06-09 09:42:30,281 - OrtInferSession - WARNING: CUDAExecutionProvider is not avaiable for current env, the inference part is automatically shifted to be executed under CPUExecutionProvider. 2025-06-09 09:42:30.312673212 [E:onnxruntime:Default, provider_bridge_ort.cc:2195 TryGetProviderInfo_CUDA] /onnxruntime_src/onnxruntime/core/session/provider_bridge_ort.cc:1778 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcublasLt.so.12: cannot open shared object file: No such file or directory 2025-06-09 09:42:30.312692328 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:1055 CreateExecutionProviderInstance] Failed to create CUDAExecutionProvider. Require cuDNN 9.* and CUDA 12.*. Please install all dependencies as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported. 2025-06-09 09:42:30,357 - OrtInferSession - WARNING: CUDAExecutionProvider is not avaiable for current env, the inference part is automatically shifted to be executed under CPUExecutionProvider.
最新发布
06-10
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值