错误:无法卸载“PyYAML”已解决的方法

问题描述 投票:0回答:2
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 install -U PyYAML               
Defaulting to user installation because normal site-packages is not writeable
Processing ./.cache/pip/wheels/e5/9d/ad/2ee53cf262cba1ffd8afe1487eef788ea3f260b7e6232a80fc/PyYAML-5.3.1-cp36-cp36m-linux_x86_64.whl
Installing collected packages: PyYAML
Successfully installed PyYAML-5.3.1


$ pip show PyYaml

Name: PyYAML
Version: 5.3.1
Summary: YAML parser and emitter for Python
Home-page: https://github.com/yaml/pyyaml
Author: Kirill Simonov
Author-email: [email protected]
License: MIT
Location: /home/ranger/.local/lib/python3.6/site-packages
Requires: 
Required-by:
pyyaml
2个回答
2
投票
sudo -H pip3 install --ignore-installed PyYAML

0
投票

我通过以下命令解决了:

$ pip install -U PyYAML               
Defaulting to user installation because normal site-packages is not writeable
Processing ./.cache/pip/wheels/e5/9d/ad/2ee53cf262cba1ffd8afe1487eef788ea3f260b7e6232a80fc/PyYAML-5.3.1-cp36-cp36m-linux_x86_64.whl
Installing collected packages: PyYAML
Successfully installed PyYAML-5.3.1


$ pip show PyYaml

Name: PyYAML
Version: 5.3.1
Summary: YAML parser and emitter for Python
Home-page: https://github.com/yaml/pyyaml
Author: Kirill Simonov
Author-email: [email protected]
License: MIT
Location: /home/ranger/.local/lib/python3.6/site-packages
Requires: 
Required-by:
© www.soinside.com 2019 - 2024. All rights reserved.