Configure python environment variables(Mac)
1. View the python installation location
where python3
2. Open the bash_profile file and append two lines
sudo vim ~/.bash_profile
The address is the address where you installed python
Press the letter i before entering the code
export PATH="/usr/bin:${PATH}"
alias python="/usr/bin/python3"
Press esc
to exit, hold down shift
+ :
, and enter wq
to exit bash_profile
3.Save configuration
source ~/.bash_profile