Mac卸载自带python

The complete list isdocumented here. Basically, all you need to do is the following:

Remove the Python 2.7 framework

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

Remove the Python 2.7 applications directory

sudo rm -rf "/Applications/Python 2.7"

Remove the symbolic links in/usr/local/binthat point to this Python version seels -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7'and then run the following command to remove all the links:

cd/usr/local/bin/ls-l/usr/local/bin|grep'../Library/Frameworks/Python.framework/Versions/2.7'|awk'{print $9}'|tr-d@|xargs rm

If necessary, edit your shell profile file(s) to remove adding/Library/Frameworks/Python.framework/Versions/2.7to yourPATHenvironment file. Depending on which shell you use, any of the following files may have been modified:~/.bash_login,~/.bash_profile,~/.cshrc,~/.profile,~/.tcshrc, and/or~/.zprofile.


来自 https://stackoverflow.com/questions/3819449/how-to-uninstall-python-2-7-on-a-mac-os-x-10-6-4

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容