Python,pip安装模块提示模块无法卸载导致安装失败,which files belong to it which would lead to only a partial uninstall.

问题描述:

pip安装模块的时候,模块无法安装成功,提示有模块无法卸载

这次是tbb模块无法卸载,之前遇到过wrapt、setuptools、request、反正同样的报错无论什么报错,都可以通过这个方案解决

Installing collected packages: tbb, intel-openmp, typing-extensions, mkl, torch
  Attempting uninstall: tbb
    Found existing installation: TBB 0.2
error: uninstall-distutils-installed-package

× Cannot uninstall TBB 0.2
╰─> 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.

解决方案:

XXX是你要安装的模块,--ignore-installed这个代表忽略错误安装。

pip install XXX --ignore-installed

你可能感兴趣的:(python,pip,开发语言)