2020-07-27
阅读量:
3212
利用pip重新安装scikit-learn时提示:Cannot uninstall 'scikit-learn'
Anaconda3中的版本是0.17.1 版本太低,想要对其升级,升级代码为:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn scikit-learn==0.22.2.post1
但是发现报错:
Cannot uninstall 'scikit-learn'. 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.
解决办法:
这是因为scikit-learn是conda管理的包,用pip卸载会出现卸载不了的情况
运行conda remove scikit-learn,先利用conda卸载scikit-learn,然后在运行安装的命令就可以安装了,这里指定的版本是0.22.2.post1






评论(0)


暂无数据