loading...

re: How to set Python3 as a default python version on MacOS? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I have followed all the steps but python --version gives Python 2.7.16 as output. Please help. ls -l /usr/local/bin/python* lrwxr-xr-x 1 apoorvee...
 

Did you check after starting a new terminal session?

 

Yes, I did.
Moreover, I tried following tedro's method above in the comment section.. but I don't know how the path is different ...Although this method worked but will that path create any problem later on?
On my mac
which pip results in
/usr/local/bin/pip
instead of
/Library/Frameworks/Python.framework/Versions/3.8/bin/pip

Last login: Thu Apr 16 18:09:08 on ttys000
apoorveesinha@Apoorvees-Air ~ % python --version
Python 2.7.16
apoorveesinha@Apoorvees-Air ~ % python3 --version
Python 3.8.2
apoorveesinha@Apoorvees-Air ~ % pip3 --version
pip 19.2.3 from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip (python 3.8)
apoorveesinha@Apoorvees-Air ~ % pip3 install --upgrade pip
Collecting pip
Downloading files.pythonhosted.org/packages/54... (1.4MB)Installing collected packages: pip
Found existing installation: pip 19.2.3
Uninstalling pip-19.2.3:
Successfully uninstalled pip-19.2.3
Successfully installed pip-20.0.2
apoorveesinha@Apoorvees-Air ~ % which pip
/usr/local/bin/pip
apoorveesinha@Apoorvees-Air ~ % which pip
/usr/local/bin/pip
apoorveesinha@Apoorvees-Air ~ % sudo ln -s -f /usr/local/bin/python3.8 /usr/local/bin/python
Password:
apoorveesinha@Apoorvees-Air ~ %

close/open terminal

apoorveesinha@Apoorvees-Air ~ % python --version
Python 3.8.2
apoorveesinha@Apoorvees-Air ~ % python3 --version
Python 3.8.2

Please help!

code of conduct - report abuse