一、安装brew
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
二、安装pyenv
brew install pyenv zlib bzip2 pyenv-virtualenv
三、配置变量
bash
vim .zshrc
export LDFLAGS="-L/usr/local/opt/zlib/lib"
export CPPFLAGS="-I/usr/local/opt/zlib/include"
alias ipyenv="arch arm pyenv"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
source .zshrc
bash
vim .zprofile
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
source .zprofile
然后就能用了