Mac 删除/卸载 本身安装的python

官网pkg安装的python版本

第一步:删除框架python

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

第二步:删除应用目录bash

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

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

附图:ui

这里写图片描述

这里写图片描述

这里写图片描述

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


homebrew安装的python版本

命令卸载:.net

brew uninstall python
  • 1

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

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版本server

来源 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/78608704blog

相关文章
相关标签/搜索