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