美文网首页
Cannot uninstall 'PyYAML'. It is

Cannot uninstall 'PyYAML'. It is

作者: zyyupup | 来源:发表于2020-05-28 16:57 被阅读0次

1 问题描述

在安装PyYaml的时候出现以下问题:
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.

2 问题原因

当前环境已经存在PyYaml包,可能不是通过pip安装,所以在更新的时候pip不能卸载旧版本。
我的旧版本是3.12,想更新的版本是5.3.1.

3 解决方案

3.1 pip install docker-py --ignore-installed PyYAML

docker-py即想要安装的包。由于我想要安装的包就是PyYAML,所以不适用。

3.2 pip install ~/Downloads/PyYAML-5.3.1.tar.gz --user

相关文章

网友评论

      本文标题:Cannot uninstall 'PyYAML'. It is

      本文链接:https://www.haomeiwen.com/subject/tspaahtx.html