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 下面