austinthesing
austinthesing

Reputation: 735

How to run programs in Python 3.5 on Mac OS X 10.11 "El Capitan"?

I installed Python 3.5 on the latest OS X but when I run python in Terminal it is still version 2.7. How do I run apps using 3.5?

Upvotes: 0

Views: 1530

Answers (2)

Ray
Ray

Reputation: 41488

My advice, use pyenv to control the version of python you want running at any time. http://amaral-lab.org/resources/guides/pyenv-tutorial

pyenv will give you the ability to switch back and forth between any version of python available

Also, with pyenv:

  • you don't need to modify scripts to have odd named python's like python3 or python2.7
  • You won't be supprised when OSX drops or changes what the base python version is.

Upvotes: 1

Seekheart
Seekheart

Reputation: 1173

first thing to check when you installed Python3.5 is it setup correctly like environment variables, $PATH all that.

next run these commands.

which python
which python3.5

if the second one works then you can make a symlink to it and it should all be good to go. The reason why your installation still uses python 2.7 is due to the fact that the command python points to python 2.7 which came bundled with all mac OS.

To run python 3.5 just type

python3.5

Upvotes: 3

Related Questions