1、安装brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
国内大佬的短命令:/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
参考:https://www.cnblogs.com/liyihua/p/12753163.html
2、更新brew
brew update
3、安装python3.10
brew install python@3.10
4、更新python模块安装源
修改配置文件 ~/.pip/pip.conf
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple#修改默认安装源为清华大学的
[install]
trusted-host =
pypi.tuna.tsinghua.edu.cn#设置信任源
5、多个python版本时候的模块安装
python3.10 -m pip install 模块