user3798654 user3798654 - 1 year ago 151
Python Question

How do I make Python 3.5 my default version

I have just installed Python 3.5.1 on my Mac (running the latest version of OSX). My system came with Python 2.7 installed. When I type

at the Terminal prompt my system pulls up the original Python 2.7 rather than the newly installed Python 3.5. How do I get my system to default to Python 3.5.1 when I open the IDLE window from Terminal?

Answer Source

Since Python 2 and 3 can happily coexist on the same system, you can easily switch between them by specifying in your commands when you want to use Python 3.

So for Idle, you need to type idle3 in the terminal in order to use it with Python 3 and idle for using it with Python 2.

Similarly, if you need to run a script or reach a python prompt from the terminal you should type python3 when you want to use Python 3 and python when you want to use Python 2.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download