How to uninstall Python 2.7 (installed by yourself) on a Mac OS
2016-02-01 10:51
661 查看
How to uninstall Python 2.7 (installed by yourself) on a Mac OS
1. Open the terminal.2. Remove the Python 2.7 framework:
sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7
3. Remove the Python 2.7 applications directory:
sudo rm -rf "/Applications/Python 2.7"
4. Remove the symbolic links in /usr/local/bin that point to Python 2.7:
cd /usr/local/bin
ls -l . | grep '../Library/Frameworks/Python.framework/Versions/2.7' | awk '{print $9}' | xargs sudo rm
5. Back to the system default Python:
cd /Library/Frameworks/Python.framework/Versions
sudo rm Current
sudo ln -s /usr/bin/python Current
PS: If you do not carry out Step 5, then there will be an error when you start python in the terminal.
相关文章推荐
- Python面试题总结
- python 命令行参数
- python selenium--常用函数3
- python selenium--常用函数1
- 内置函数filter
- Python 字符串操作方法大全
- Python--元编程
- python threading中处理主进程和子线程的关系
- Python Closure 闭包
- 关于python 自带csv库的使用心得 附带操作实例以及excel下乱码的解决
- Python Decorators 装饰器
- Python找出9个连续的空闲端口
- Python爬虫之urllib2笔记
- python搭建简单本地服务器
- python 百度top100和top500歌曲下载
- 采集百度top500歌曲,python2.7.2
- Python排序总结:列表、字典、包含字典的列表、包含元组的列表排序
- Python学习第七天
- python学习笔记之装饰器、递归、算法(第四天)
- python科学计算六:scipy矩阵操作