pip安装:Cannot uninstall ''. It is a distutils installed project and thus we cannot accurate

在配置tensorflow的过程中,通过pip直接安装gpu版本时遇到了这个错误,
pip安装:Cannot uninstall ''. It is a distutils installed project and thus we cannot accurate
查了好长时间找不到解决办法,最终摸索出解决办法如下:
我遇到的错误:

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.

解决办法:
找到wrapt.egg-info,一般就在usr/lib/python2.7或者其他安装pythonxxx dist-packages等路径里,如果是在anaconda里面的话。路径如下:
pip安装:Cannot uninstall ''. It is a distutils installed project and thus we cannot accurate
也可以直接在/目录下全局搜索。然后删掉即可。
其他的package遇到这种情况方法也通用,搜索.egg-info,找到后删除。

上一篇:在Python程序包中需要BeautifulSoup-setup.py需要什么?


下一篇:python包的数据缓存