Q:

set python3 as default mac

$ brew update && brew upgrade python 
1
$ pyenv global 3.7.3
# and verify it worked 
$ pyenv version
3.7.3 (set by /Users/mbbroberg/.pyenv/version)
2
$ brew install pyenv 
1
# Go into your .zshrc file. Is there a line that reads:
alias python='python3'
0
# it is said not to do but I used it anyway, because of the conveniency
$ echo "alias python=/usr/local/bin/python3.7" >> ~/.zshrc 
0
ln -s -f /usr/local/bin/python3.7 /usr/local/bin/python
1
[ -e ~/.profile ] && . ~/.profile
0

Tags

New to Communities?

Join the community