Mac will be upgraded to Python3 Python2

Copyright: https://blog.csdn.net/Dongguabai/article/details/91347558

Use Python3 is the general trend, but comes with the Mac version 2.7:

➜  ~ python --version
Python 2.7.10

It can be performed:

➜  ~ brew install python3

After the installation is complete, set the environment variable:

➜  bin which python3            
/usr/local/bin/python3
➜  bin vim ~/.bash_profile 
➜  bin vim ~/.zshrc  
alias python='/usr/local/bin/python3'

 

Guess you like

Origin blog.csdn.net/Dongguabai/article/details/91347558