ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately

ERROR: Cannot uninstall 'PyYAML'. 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.

错误:无法卸载“ PyYAML”。 这是一个distutils安装的项目,因此我们无法准确确定属于该文件的文件,而这只会导致部分卸载。

我在ubuntu中安装kolla-ansible时报了上面这个错误 sudo pip install kolla-ansible

ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately

然后将安装命令改为sudo pip install kolla-ansible --ignore-installed PyYAML就行了.

ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately 

加的--ignore-installed PyYAML应该是通过 pip 安装 kolla-ansible时,忽略某些依赖,此处为PyYAML。

可以参考这篇文章http://ju.outofmemory.cn/entry/262198