Cannot uninstall ‘PyYAML‘ 解决方法

一、背景

一般是在卸载、更改版本时出现。

二、现象

pip3 uninstall PyYAML
或
pip3 install PyYAML

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.

三、方法

直接用pip无法删除,可以找到这个依赖手动删除

find / -name *PyYAML*

–>

/usr/local/lib/python3.7/dist-packages/PyYAML-6.0.dist-info

删掉这个文件就可以了。

你可能感兴趣的:(#,部署安装,pycharm,ide,python)