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