1. 错误信息描述
在安装tensorflow时遇到如下报错:
ERROR: Cannot uninstall 'wrapt'. 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.
截图如下:
2. 解决方案
方案1:
conda update --all
pip install --upgrade tensorflow==xxx
使用conda update时往往需要修改conda的镜像源(如清华源)来加速:
https://mirror.tuna.tsinghua.edu.cn/help/anaconda/
ps:如仍有问题,可考虑将channels中的 https -> http。
但在一些公司内网中,配置conda镜像源并不方便,此时可考虑使用方案2;
方案2:
pip install wrapt --upgrade --ignore-installed
pip install tensorflow
仅供参考!