How to uninstall all python versions and use the default system version of OS X 10.10?

前端 未结 1 591
Happy的楠姐
Happy的楠姐 2021-01-12 01:54

I\'m looking for a way to cleanly uninstall all versions of python on OS X 10.10 except the default version that followed with the Mac. How do I proceed?

Currently

1条回答
  •  囚心锁ツ
    2021-01-12 02:16

    The file /usr/bin/python (and /usr/bin/pythonw, which is a hard link to the same file) is actually a launcher program that invokes the default version of Python from /System/Library/Frameworks/Python.framework/Versions. You can select the version (2.6 and 2.7 in Yosemite) the launcher invokes using either the defaults command or the VERSIONER_PYTHON_VERSION environment variable.

    If you want to run a specific version manually, you can invoke /usr/bin/python2.6 or /usr/bin/python2.7, which are symbolic links into /System/Library/Frameworks/Python.framework/Versions.

    You should be fine removing all other Python implementations you list from your path, including /Library/Frameworks/Python.framework/Versions/2.7/bin/python (not sure how you got that one). It would still be wise to move them somewhere (e.g. your trash folder) to test your change before deleting them permanently.

    0 讨论(0)
提交回复
热议问题