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.

使用pip在Ubuntu上安装tfx(TensorFlow extended):

pip install -q tfx==0.15.0rc0

报错:

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。

找了一下原因:

从pip 10开始就不支持卸载distutils的包了,查看GitHub上的issue。

解决方案:

在命令上添加

pip install -q tfx==0.15.0rc0 --ignore-installed

参考:

https://stackoverflow.com/questions/49911550/how-to-upgrade-disutils-package-pyyaml

版权声明:著作权归作者所有。

相关推荐

[译]Vue - 解决Cannot Find Element错误

如果你刚接触Vue,可能会遇到一些不熟悉的错误。实际上,我在创建delimiter app时看到了一个我不太熟悉的错误。例如,你可能在Vue里看到“Cannot find element”的错误。在Google Chrome中,你会在控制台窗口中看到此错误,如下所示:发生这种错误是因为过早实例化Vue。通常情况下,你会看到此错误,是因为挂载Vue的HTML元