Have two versions of Python in OSX, no overwrite

Asked

Viewed 169 times

3

Is there any way to install version 3.x of Python without overwriting the pre-installed (essential) version of OSX?

I already know the virtualenv but I would like to avoid it, because I only use Python to study.

Is there any way to keep the two versions parallel and "living in harmony"?

I imagine I could do something like that:

Start Python 2

MBP:~ jbueno$ python 

Start Python 3

MBP:~ jbueno$ python3

1 answer

3


Just install Homebrew from the terminal (you need Xcode installed):

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then just install Python 3 via the command brew:

brew install python3

To run something using Python 3 just use the command python3 instead of just python.

python3 --version
  • At http://brew.sh you can get more details, it’s just a package installer.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.