• 技术文章 >Python技术 >Python基础教程

    mac怎么删除python

    爱喝马黛茶的安东尼爱喝马黛茶的安东尼2019-09-17 17:23:33原创8290

    mac 默认安装了python2;自己后面又安装了python3;为了方便,现在想将python3换成Anaconda3。

    Anaconda是一个开源的Python发行版本,其包含了conda、Python等180多个科学包及其依赖项。

    Python3安装之后,在系统中不同目录下存在各种依赖关系,下面我们一步一步来把python3.7 完全卸载,无残留。

    相关推荐:《Python教程

    # python3版本查看

    $ python3 --version
    Python 3.7.1

    # 删除Python 3.7 框架:

    $ ls /Library/Frameworks/Python.framework/Versions/
    3.7
    $ sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.7

    # 删除Python 3.7 应用目录:

    $ cd /Applications
    $ sudo rm -rf Python\ 3.7/   #Python 3.7存在空格

    查看launchpad中python3的IDLE就被删除了

    # 删除/usr/local/bin 目录下指向的Python3.7 的连接:

    $ cd /usr/local/bin/ 
    $ ls -l /usr/local/bin
    $ rm Python3.7相关的文件和链接 #Python3.7相关的文件和链接需要你自行确认

    # 删除python的环境路径

    $ vi ~/.bash_profile

    删除Python3.7设置的环境路径。

    # 确认python是否已经删除

    $ python3
    -bash: python3: command not found
    专题推荐:mac 删除 python
    品易云
    上一篇:mac如何安装python包 下一篇:python mysql错误如何处理

    相关文章推荐

    • mac如何使用python• mac如何卸载python3• mac如何安装python包

    全部评论我要评论

    © 2021 Python学习网 苏ICP备2021003149号-1

  • 取消发布评论
  • 

    Python学习网