卸载方法
1. 使用 Homebrew 卸载特定版本
卸载 python@3.10"">`python@3.10`:
brew uninstall python@3.10卸载 python@3.12"">`python@3.12`:
brew uninstall python@3.12
2. 进行完卸载后,确认已删除
brew list | grep python如果没有输出相关版本,说明已成功卸载。
3. 如果之前有用 brew link 指向某个版本,可以用下面的命令解除“软连接”:
brew unlink python@3.10
brew unlink python@3.12(如果之前没有显示出链接,也可忽略)
额外建议
删除相关别名: 如果在
~/.zshrc或~/.bash_profile设置了alias,可以手动删除对应的行,或者全部清除。清除配置: 删除或注释掉配置中的
alias行,保持环境干净。
简洁总结
| 操作 | 命令 |
|---|---|
| 卸载 Python 3.10 | brew uninstall python@3.10 |
| 卸载 Python 3.12 | brew uninstall python@3.12 |
| 解除链接(如果有) | brew unlink python@3.10 |
| 解除链接(如果有) | brew unlink python@3.12 |
作者:admin 创建时间:2025-10-24 22:22
最后编辑:admin 更新时间:2025-10-24 22:23
最后编辑:admin 更新时间:2025-10-24 22:23