docneogi
docneogi

Reputation: 55

Python 3.5 for OS X El Capitan

I am using OS X El Capitan and my default Python version is 2.7.10.

How can I change the default version to Python 3.5 for Terminal use?

Upvotes: 1

Views: 32466

Answers (3)

aniran mohammadpour
aniran mohammadpour

Reputation: 161

you can use other answers and update your python version (actually you shouldnt update 2.7 because it makes problems for your applications that uses that version of python) OR

Use

Python3

Because you have it already

for your works like making virtual environments in that version.

My suggestion for you if you want to use different python versions on your system that could be so useful for ML and Data minings is USING

Pyenv

helps you manage you python versions.

Upvotes: 0

Soumojit Ghosh
Soumojit Ghosh

Reputation: 941

El Capitan comes bundled with 2.7 and is used internally, so its best you don't do anything with it.

The easiest way is to download the Mac installer,

https://www.python.org/ftp/python/3.5.0/python-3.5.0-macosx10.6.pkg

Install it by following the steps in the GUI, go to terminal and to start python type,

python3

For Brew, kindly refer to the document,

Installing Python on Mac OS X

It has a step-by-step guide to help you through the entire process of installing python 3.x

Regards.

Upvotes: 27

Subramanya Vajiraya
Subramanya Vajiraya

Reputation: 319

Leave Python 2.X as it is.

Download Python either from https://www.python.org/ftp/python/3.5.0/python-3.5.0-macosx10.6.pkg or HomeBrew or via Anaconda from https://www.continuum.io/downloads.

add an alias in your ~/.bash_profile as follows

alias python='python3'

Hope that helped

Upvotes: 10

Related Questions