我的电脑里python版本挺多的 我主要是想下载3.7并且优先使用3.7进行编译
1、使用homebrew安装
python官网打开巨慢直接brew
brew install python@3.7
安装过程中出现了curl: (22) The requested URL returned error: 404
这个报错 更新一下brewbrew update
就ok
2、优先使用python3.7
安装完以后运行一下下面这个命令
echo 'export PATH="/usr/local/opt/python@3.7/bin:$PATH"' >> ~/.zshrc
补充:
查看python3在哪
which python3
根据路径找文件:在访达中command + shift + G