1、使用brew将Python 3.7降级到3.6
brew unlink python brew install --ignore-dependencies https://raw.githubusercontent.com/Homebrew/homebrew-core/e128fa1bce3377de32cbf11bd8e46f7334dfd7a6/Formula/python.rb brew switch python 3.6.5
切换Python 3.6.5后安装软件,例如,安装tensorflow
pip install tensorflow
2、使用conda将Python 3.7降级到3.6
创建名字为tensorflow虚拟环境
conda create -n tensorflow python=3.7 conda activate tensorflow conda install python=3.6.5
切换Python 3.6.5后安装软件,例如,安装tensorflow
pip install tensorflow
3、使用pyenv 将Python 3.7降级到3.6
pyenv install 3.6
pyenv global 3.6
全局使用Python 3.6,然后安装软件,例如,安装tensorflow
pip install tensorflow