mac安装python3
1、查看python
brew search python3
2、安装python
brew install python3
可以看到python3的实际安装目录是/usr/local/Cellar/python3/3.6.2
4、打开配置文件并写入python的外部环境变量
open ~/.bash_profile
export PATH=${PATH}:/usr/local/Cellar/python/3.7.3/bin
5、重命名python
alias python="/usr/local/Cellar/python/3.7.3/bin/python3.7"
6、让配置文件生效
source ~/.bash_profile
7、查看结果

浙公网安备 33010602011771号