m1 安装 python

brew install python3

Screenshot 5

更改.bashrc.zshrc

alias python="/opt/homebrew/bin/python3"
alias python3="/opt/homebrew/bin/python3"

确认 pip 命令

$ python3 -m pip --version
pip 22.2.2 from /opt/homebrew/lib/python3.10/site-packages/pip (python 3.10)

$ python3 -m pip install --upgrade setuptools
$ python3 -m pip install --upgrade pip

$ pip --version

image-20221109午後33348088

image-20221109午後33432512

修改pip源为阿里源

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple

参考资料


python 使用备忘 pandas 备忘