DEV Community

loading...

Discussion on: How to set Python3 as a default python version on MacOS?

Collapse
amazinggrace2019 profile image
Unicorn

Hi,
I am still stuck
(base) Carolines-MBP:~ carolinekibat$ ls -1 /usr/local/bin/python*
/usr/local/bin/python
/usr/local/bin/python3
/usr/local/bin/python3-config
/usr/local/bin/python3.8
/usr/local/bin/python3.8-config
(base) Carolines-MBP:~ carolinekibat$ ln -s -f /usr/local/bin/python3.8 /usr/local/bin/python
ln: /usr/local/bin/python: Permission denied

Then I tried pip
(base) Carolines-MBP:~ carolinekibat$ python --version
Python 2.7.14 :: Anaconda, Inc.
(base) Carolines-MBP:~ carolinekibat$ pip3 --version
pip 20.1.1 from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip (python 3.8)
(base) Carolines-MBP:~ carolinekibat$ pip3 install --upgrade pip
Requirement already up-to-date: pip in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (20.1.1)
(base) Carolines-MBP:~ carolinekibat$ which pip
/Library/Frameworks/Python.framework/Versions/3.8/bin/pip
(base) Carolines-MBP:~ carolinekibat$ sudo ln -s -f /usr/local/bin/python3.8 /usr/local/bin/python
Password:

close and open terminal

Last login: Sat Jun 27 20:32:57 on ttys000
You have new mail.
(base) Carolines-MBP:~ carolinekibat$ python --version
Python 2.7.14 :: Anaconda, Inc.
(base) Carolines-MBP:~ carolinekibat$

Why doesn't it change to python 3?