文章目录
- 1. 安装
- 1.1 brew安装(失败)
- 2. 下载安装包
- 2. 查看版本
- 3. 配置
1. 安装
1.1 brew安装(失败)
brew install python3
下载完成后报错:
Error: python@3.10: unknown or unsupported macOS version: :dunno
解决:执行brew update-reset,然后再次执行上面命令(不会重复下载)
下载失败
参考 https://pythonjishu.com/cidbhrhwuzrvtfs/
2. 下载安装包
地址 https://www.python.org/downloads/
点击下载

2. 查看版本
python3

3. 配置
# 查看安装路径
wanfei@mofeideMacBook-Pro ~ % which python3
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3
# 打开.bash_profile文件
vim ~/.bash_profile
# 输入
alias python="/Library/Frameworks/Python.framework/Versions/3.12/bin/python3"
配置生效(临时)
source ~/.bash_profile
永久生效
vi ~/.zshrc
# 添加
source ~/.bash_profile
关闭终端再打开
python -V

参考 https://blog.csdn.net/Sarah_luxy/article/details/128810236















![[机缘参悟-118] :如何做到:从无到有,从0到1设计一个新系统或产品?如何做到总是能快速的解决复杂技术难题?](https://img-blog.csdnimg.cn/91dfe26d385a4df3b709dc352c15c7f2.png)



