欢迎光临
我们一直在努力

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

问题:
安装yq时,一直提示
"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"

解决:
try using the --ignore-installed flag:

sudo -H pip3 install PyYAML --ignore-installed

This works because to upgrade a package, pip first uninstalls the old version, then installs the new version. It is the uninstall step that fails for distutils packages. With the --ignore-installed flag, the uninstall step is skipped and the new version is simply installed on top of the old one.

参考资料:
https://stackoverflow.com/questions/49911550/how-to-upgrade-disutils-package-pyyaml

赞(0)
未经允许不得转载:飘云 » 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
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址