pip install 时,报错 Cannot uninstall 'six' 的解决方案
发布于 作者:苏南大叔 来源:程序如此灵动~
在试用pip install
某模块时,出现了下面这个有关six
的报错信息,看起来是相当的奇怪。苏南大叔查阅了相关issue
,使用了强制升级six
的方法,解决了这个问题,顺利继续安装相关模块。那么到底如何解决Cannot uninstall 'six'
的问题呢?请看相关经验记录:
强制升级后的six
版本号为:1.11.0
。
报错信息如下
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 uninstall.
实际上是在安装另外的模块,对应模块需要高版本的six
,所以先卸载低版本的six
。这个时候报错了。
解决方案
sudo pip install six --upgrade --ignore-installed six
强制升级six
后,问题消失,顺利解决问题。
相关链接
总结
为了安装而先卸载,卸载的时候,却晕了头,那么就强制升级吧,似乎故事就是这样的。
更多苏南大叔写下的python
经验文字,请点击下面的链接查看:


