0

I have python 3.6 and python 3.7 installed on my Mac. When I type python3 --version in terminal, output is "Python 3.6.0" . Maybe it would be better just to uninstall python 3.6? Then how do I do that properly? I spent quite some time googling this and results are mostly about changing default system python from 2.7 to 3 which is not what I want.

mk_hat
  • 1
  • 3
  • 2
    Possible duplicate of [How to set Python's default version to 3.x on OS X?](https://stackoverflow.com/questions/18425379/how-to-set-pythons-default-version-to-3-x-on-os-x) – sa_n__u Oct 10 '19 at 07:37

2 Answers2

0
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 1
sudo update-alternatives --config python
sudo update-alternatives --set python /usr/bin/python3.7
  • command not found. Could it be because of new shell on Mac - zsh? Edit: Seems like update-alternatives doesn't work on OS X. – mk_hat Oct 10 '19 at 08:50
0

You could install a Python version management tool like pyenv. Then you could install your version of choice and set it as global default with

pyenv versions  # List versions available to pyenv
pyenv global <version>  # Set global default version
Syntaxén
  • 465
  • 1
  • 8
  • 15