一般是在卸载、更改版本时出现。
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
删掉这个文件就可以了。