MacBook pro M1配置python3.9.1环境

换了新版MacBook Pro一堆环境重新配置,python3.9.1支持m1

默认安装后配置python环境

vim ~/.bash_profile

文件中添加:

alias python3="/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9"
PATH="/Library/Python/3.9/lib/python3.9/site-packages:${PATH}"
export PATH

保存退出,source命令生效

source ~/.bash_profile

查看python环境是否生效:

命令行输入:python3

macvim python3 macvim Python3.9_Python


查看pip版本

命令行输入:pip --version

macvim python3 macvim Python3.9_命令行_02


环境配置完成