brew search python3
安装Python3,等待......
brew install python3
环境变量配置
vi ~/.bash_profile
PATH=$PATH:/usr/local/mysql/bin:/usr/local/Cellar/python3/3.7.0/bin
M2_HOME=/Users/huipay/Documents/apache-maven-3.5.3
PATH=$PATH:$M2_HOME/bin
export M2_HOME
export PATH
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
~
注意点:确保优先搜索用户路径
sudo vim /etc/paths
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
brew link python3
brew install python3
Warning: python3 3.6.3 is already installed, it's just not linked.
You can use `brew link python3` to link this version.
$ brew link python3
Linking /usr/local/Cellar/python3/3.6.3... Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks
发现/usr/local/下没有路径/usr/local/Frameworks
需要新建该路径,并修改权限
$ sudo mkdir /usr/local/Frameworks
$ sudo chown $(whoami):admin /usr/local/Frameworks
找不到pip3?
brew reinstall python3 --with-brewed-openssl
愉快的玩耍吧~~
网友评论