-1

Can installing Python 3 wrong break other codes, applications etc. in Mac; or can I just install how I want? Cause I code in Python 3 and my Mac's built-in is 2.7

(By "how i want", I mean can any method work without any problem)

bapap
  • 514
  • 8
  • 25

1 Answers1

0

You can simply install a Python3 version. If you use Homebrew you can easy install a version with the following command:

brew install python3

After the installation you can check your currently python version:

python3 --version

At the end you can still run python scripts with Python2 by simply typing python.

flaxel
  • 4,173
  • 4
  • 17
  • 30
  • I thought `brew install python` symlinks `python3` to `python`, does it? And will installing Python from its website do the same thing? – bapap Aug 24 '20 at 12:29
  • Yes this command do the symlink ([another post](https://stackoverflow.com/a/49711594/10951752)). So if you want to use the two versions you must install python3 explicitly. I have had good experience with installing the two versions, so you can quickly switch to the other version. I have never had problems with it. But I guess it should work if you do the symlink with `brew install python`. – flaxel Aug 24 '20 at 12:42
  • Can installing from its website cause a problem? – bapap Aug 24 '20 at 12:52
  • No, I didn't install it yet. I do not know how Mac works so I wanted to ask. – bapap Aug 24 '20 at 12:58
  • 1
    If you want to know more details about the python3 installation on a mac with preinstalled python 2.7, I find a [nice description](https://medium.com/@rajputankit22/install-python3-in-macos-high-sierra-675d58913e6b). – flaxel Aug 24 '20 at 13:13