- 因為m1芯片是arm版本的架構,以前在mac上的很多軟件都是基於Intel架構的軟件,apple開發了rossta2,可以在m1上運行intel架構的軟件,但是性能會有損失
- python的3.9版本已原生支持m1芯片,更多支持m1芯片的軟件可以查看網址:https://isapplesiliconready.com/
使用miniforge
- GitHub地址:https://github.com/conda-forge/miniforge
- Gitee地址:https://gitee.com/photographer_adam/miniforge
- 下載arm版的軟件,點擊花線的版本鏈接下載
- 進入終端,cd到下載目錄
cd ~/Downloads
- 下載完成后得到
*.sh
的文件
- 執行
sh
sh Miniforge3-MacOSX-arm64.sh
- 按照提示輸入enter等命令即可
- 檢查是否安裝成功,在終端輸入命令
conda --version
python --version
- 創建環境,指定為python3.9
conda create -n 虛擬環境的名字 python==3.9
例如:conda create -n test python==3.9
- 激活環境
conda activate 虛擬環境名稱
例如:conda activate learnCV
9. 安裝jupyter notebook
conda install jupyter notebook
輸入y,安裝包和依賴
jupyter notebook
- 進入jupyter notebook新建文件測試,輸入一下命令
import sys
print ("Python Version {}".format(str(sys.version).replace('\n', '')))