zoukankan      html  css  js  c++  java
  • Mac 删除/卸载 自己安装的python

    官网pkg安装的python版本

    第一步:删除框架

    sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7
    • 1

    第二步:删除应用目录

    sudo rm -rf "/Applications/Python 2.7"
    • 1

    第三步:删除指向python的链接

    cd /usr/local/bin/
    
    ls -l /usr/local/bin | grep '/Library/Frameworks/Python.framework/Versions/2.7'                             # 查看链接
    
    brew prune                  # 清除链接和目录
    • 1
    • 2
    • 3
    • 4
    • 5

    清除后可再次查看链接,会发现链接已清除

    附图:

    这里写图片描述

    这里写图片描述

    这里写图片描述

    可参考: 
    https://stackoverflow.com/questions/22774529/what-is-the-safest-way-to-removing-python-framework-files-that-are-located-in-di


    homebrew安装的python版本

    命令卸载:

    brew uninstall python
    • 1

    最后,推荐使用homebrew安装python: 
    1. 可以指定python版本 
    2. 安装卸载都方便,避免对系统自带的python版本误操作 
    3. 安装某些软件时会连带安装python包,如果系统中已安装该版本包,但不是用brew安装的,就会引起冲突,导致安装失败

    Homebrew only supports building against the System-provided Python or a
    brewed Python. In particular, Pythons installed to /Library can interfere
    with other software installs.
    • 1
    • 2
    • 3

    homebrew只支持编译系统默认brew安装的python版本

    来源python安装路径
    系统默认 /System/Library/Frameworks/Python.framework/Versions/2.7
    brew安装 /usr/local/Cellar
    官网pkg安装 /Library/Frameworks/Python.framework/Versions/2.7

    reference from : http://blog.csdn.net/tymatlab/article/details/78608704

  • 相关阅读:
    JZOJ5809 数羊
    P3313 [SDOI2014]旅行
    2019.10.22 NOIP模拟测试 day2
    P4322 [JSOI2016]最佳团体
    P1850 换教室
    P3225 [HNOI2012]矿场搭建
    P2607 [ZJOI2008]骑士
    2019.10.21 NOIP模拟测试 day1
    AFO
    禁止加载浏览器图片
  • 原文地址:https://www.cnblogs.com/zhangchenliang/p/8204543.html
Copyright © 2011-2022 走看看