Mac 自帶的 Python 已經能夠滿足我們的需要了,是以很多同學在安裝完 Python 之後,又想要将其删除,或者稱之為解除安裝。
對于删除 Python,我們首先要知道其具體都安裝了什麼,實際上,在安裝 Python 時,其自動生成:
1)Python framework,即 Python 架構;
2)Python 應用目錄;
3)指向 Python 的連接配接。
接下來,我們就分别(在 Mac 終端進行)删除上面所提到的三部分。
至此,我們已經成功删除 Python 的相關檔案,其中3.6為 Python 的版本号。
Mac安裝python的一些注意事項
使用brew install python3 會把python安裝到/usr/local/Cellar/python/下。盡量不要使用brew方式安裝Python
chown -R $USER /Users/zhangxm/Library/Python
python3 -m venv .venv