- 卸载系统环境内的python环境
python_version_number=3.10
sudo rm -rf /Library/Frameworks/Python.framework/Versions/${python_version_number}/
sudo rm -rf "/Applications/Python ${python_version_number}/"
cd /usr/local/bin && ls -l | grep "/Library/Frameworks/Python.framework/Versions/${python_version_number}" | awk '{print $9}' | sudo xargs rm
- 卸载homebrew中python
# 查看已安装python版本
brew search python
# 查看已安装python版本
brew list | grep python
# 卸载指定python版本
brew uninstall python@3.11