0

I was trying to install the newest version of python, 3.8. But after the installation was complete, I ran

python --version

Python 2.7.16

Is there a way to get rid of the python 2 that came with macOS? I will need to use python 3. Or is there a way to switch to python 3 from python 2?

Brandon Li
  • 114
  • 1
  • 8
  • What about `python3 --version` ? – Maurice Meyer May 10 '20 at 09:45
  • You do not want to uninstall the system Python 2. Leave it as is. You can always just use `python3` if you want Python 3, or [create a virtual environment](https://docs.python.org/3/tutorial/venv.html) and run your apps inside it, where you can use `python` as Python 3. – Gino Mempin May 10 '20 at 11:32

1 Answers1

1

I am not well experienced in MacOs but I think this may help you to upgrade the current version of your python to the newest one

$ brew update && brew upgrade python 
Dejene T.
  • 973
  • 8
  • 14