漂泊的云,停留的心!
人的头脑太复杂,时间过得久……

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)
版权声明:本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权
文章名称:《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》
文章链接:https://piaoyun.cc/1407.html
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途云路窝农家乐,否则法律问题自行承担。