brew卸载Python3
brew uninstall python3
brew cleanup
1. 删除 Python 3.x 程序:
在Mac的应用程序目录找到Python 3.x的目录,右键-移到废纸篓。
或使用Mac自带的终端执行:
sudo rm -rf "/Applications/Python 3.*"
2.删除 Python 3.x 框架:
sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.*
3.删除指向 Python 3.x 的软链接:
ls -l /usr/local/bin | grep '../../../Library/Frameworks/Python.framework/Versions/3.*' | awk '{print $9}'|tr -d @ | sudo xargs rm
4.查找删除残余Python3目录及文件
sudo find / -name "python3*" -print 2>&1 | fgrep -v "Operation not permitted" | fgrep -v "No such file or directory"
标签:..,Python,sudo,Mac,rm,Python3,Python2
From: https://www.cnblogs.com/xjzyy/p/16808073.html