MAC M1 上python 環境搭建趟坑


Python 安裝和設置環境變量之后報錯 

zsh: killed     python3

解決:MAC M1系統只支持python 3.9, 不支持3.6 和3.7

安裝命令:

先安裝brew :  /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)

        source /Users/yajuanchen/.zprofile

安裝python3:  brew reinstall $(brew deps python3) python3

上面命令完成之后 python3 已經安裝完成,命令行輸入 python3出現:

Python 3.9.5 (default, May  3 2021, 19:12:05) 

[Clang 12.0.5 (clang-1205.0.22.9)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> 

 

 

Mac M1 的環境變量存儲在 ~/.zprofile  下面

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM