python3安装tensorflow-gpu报错Cannot uninstall 'six'. It is a distutils installed project and thus we can

安装python3中的tensorflow-gpu时,报错:
Cannot uninstall 'six'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial u

在网上查资料,首先看到的是
https://blog.csdn.net/qiye005/article/details/80383467
说把一个egg-info文件删除就行了。
但是我始终找不到这个文件。

后来,看到这里
https://www.cnblogs.com/hcy-fly/p/9010190.html
有解释。原来是six这个包是python的依赖包。而安装tensorflow-gpu时,会尝试卸载six而更新它。由于这个包是python的依赖包,python不让你更新它。

解决办法
首先,我尝试使用pip更新six,发现是更新不了的。报同样的错。
我使用的是linux自带的python3.4.3,版本太旧了。于是想到更新python。
这里https://www.cnblogs.com/songfucai/p/7976623.html有如何删除旧版python的方法。
依然无法删除,在这里https://blog.csdn.net/hs794502825/article/details/7835902找到了Encountered a section with no Package: header的解决办法。

关注微信公众号“遥感头号”,获取更多有关python、深度学习、遥感的信息、学习笔记、资料

猜你喜欢

转载自blog.csdn.net/cherry593/article/details/85261664
今日推荐