Since Odoo has been upgraded from Python 2 to Python 3, the environment we use most during development is Python 3, while the Python 2 environment is gradually being used less.
First, open the terminal
Second, cd ~ to the current user directory
Third, open .bash_profile to open the file. We actually need to modify the file, but the problem is that there is no .bash_profile file in the current directory.
Fourth, touch .bash_profile to create one
Fifth, use the vim command to open the .bash_profile file and directly add the script
alias python="/usr/local/bin/python3" //Default path installed using brew install python3
alias pip="/usr/local/bin/pip3" //Default pip3 path installed using brew install python3
Then save and exit. Alternatively, we can use open .bash_profile to pop up the editing window, add the content, and then press command+s to save and close the window.
Sixth, implementation brings it into effect.
source .bash_profile
Finally, when we input in the terminal with Python, we see that the default version is 3.7.
