由于python版本的安裝和更新,在安裝過3.7版本後發現以前安裝的python3.5版本備援了,綜合參考hyluglare的部落格後,總結方法和步驟如下(均在終端操作指令即可):
# 對于mac自帶的版本,其架構目錄為:
cd /System/Library/Frameworks/Python.framework
>>>2.3 2.5 2.6 2.7 Current
# 我們安裝的 Python,其(預設)架構目錄為:
cd /Library/Frameworks/Python.framework/Versions/ # 檢視自己本地的python版本
ls
>>> 3.5 3.7
檢視指向python的連結
cd /usr/local/bin/
ls -l /usr/local/bin | grep '/Library/Frameworks/Python.framework/Versions/x.x'
>>>
lrwxr-xr-x 1 root wheel 70 Nov 20 2017 2to3-3.5 -> ../../../Library/Frameworks/Python.framework/Versions/3.5/bin/2to3-3.5
lrwxrwxr-x 1 root admin 78 Nov 20 2017 easy_install-3.5 -> ../../../Library/Frameworks/Python.framework/Versions/3.5/bin/easy_install-3.5
lrwxr-xr-x 1 root wheel 69 Nov 20 2017 idle3.5 -> ../../../Library/Frameworks/Python.framework/Versions/3.5/bin/idle3.5
lrwxr-xr-x 1 root wheel 70 Nov 20 2017 pydoc3.5 -> ../../../Library/Frameworks/Python.framework/Versions/3.5/bin/pydoc3.5
lrwxr-xr-x 1 root wheel 72 Nov 20 2017 python3-32 -> ../../../Library/Frameworks/Python.framework/Versions/3.5/bin/python3-32
lrwxr-xr-x 1 root wheel 71 Nov 20 2017 python3.5 -> ../../../Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5
lrwxr-xr-x 1 root wheel 74 Nov 20 2017 python3.5-32 -> ../../../Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5-32
lrwxr-xr-x 1 root wheel 78 Nov 20 2017 python3.5-config -> ../../../Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5-config
lrwxr-xr-x 1 root wheel 72 Nov 20 2017 python3.5m -> ../../../Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5m
lrwxr-xr-x 1 root wheel 79 Nov 20 2017 python3.5m-config -> ../../../Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5m-config
lrwxr-xr-x 1 root wheel 72 Nov 20 2017 pyvenv-3.5 -> ../../../Library/Frameworks/Python.framework/Versions/3.5/bin/pyvenv-3.5
删除指向python的連結
再次檢視連結是否删除成功
如果沒有出現檔案清單的話說明删除成功了。
Mac上就沒有3.5版本的python了。