Setting Python3.2 As Default Instead Of Python2.7 On Mac Osx Lion 10.7.5
Currently running Mac OS X Lion 10.7.5 , and it has python2.7 as default. In the terminal, i type 'python' and it automatically pulls up python2.7. I don't want that. from termina
Solution 1:
The safest way is to set an alias in ~/.bashrc
:
alias python=python3
That way you avoid breaking things for scripts relaying on python
being python2.
Solution 2:
You could edit the default python path and point it to python3.2
Open up ~/.bash_profile
in an editor and edit it so it looks like
PATH="/Library/Frameworks/Python.framework/Versions/3.2/bin:${PATH}"
export PATH
Solution 3:
If you have python 2 and 3 on brew. Following worked for me.
brew unlink python@2
brew link python@3
(if not yet linked)
Post a Comment for "Setting Python3.2 As Default Instead Of Python2.7 On Mac Osx Lion 10.7.5"