一、问题
使用pip升级包的时候报错,大概意思说 “我们不知道哪些文件依赖这个包,可能导致部分卸载”,所以无法卸载和升级。
Installing collected packages: llvmlite, numba, resampy, librosa
Found existing installation: llvmlite 0.15.0
Cannot uninstall 'llvmlite'. It is a distutils installed project and thus we can
not accurately determine which files belong to it which would lead to only a partial uninstall.
二、原因
可能这些包使用conda安装,pip无法正常解析依赖,卸载升级可能会导致依赖兼容性问题,所以无法升级。
三、解决
强制卸载或升级,操作如下
pip install --upgrade --force-reinstall <package>
或
pip install --ignore-installed <package>