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.
截圖如下:
image.png
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佛纫。
但在一些公司內(nèi)網(wǎng)中耘眨,配置conda鏡像源并不方便臭埋,此時可考慮使用方案2顷链;
方案2:
pip install wrapt --upgrade --ignore-installed
pip install tensorflow
僅供參考恕洲!