首页 > 编程知识 正文

mac里怎么把python3.9卸载干净,mac卸载python

时间:2023-05-06 11:55:17 阅读:229950 作者:3579

Python

使用homebrew安装python

brew search python (先查询python版本) brew install pythonX(下载你需要的python版本)

一.首先彻底卸载自己安装的python

删除Python 3.6 framework

sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.6

删除Python 3.6 应用目录

sudo rm -rf “/Applications/Python 3.6”

删除/usr/local/twdxxm 目录下指向的Python3.6的连接

cd /usr/local/twdxxm/

ls -l /usr/local/twdxxm | grep ‘../Library/Frameworks/Python.framework/Versions/3.6’ | awk ‘{print $9}’ | tr -d @ | xargs rm

如果需要的话,编辑配置路径的环境文件,例如 ~/.bash_login, ~/.bash_profile, ~/.cshrc, ~/.profile, ~/.tcshrc, and/or ~/.zprofile,当初安装的时候,默认是将Python3.6的信息配置在 ~/.bash_profile 文件中,将其相关信息删除

二.卸载通过brew安装的python

1.brew list 看下安装了哪个版本的python

2.brew uninstall --force python 彻底清除所有python(也可以单独删除)

好啦到此为止你mac上除了系统自带的python 其它多余的都被删除啦 爽YY~

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。