leojacoby leojacoby - 3 months ago 20
Bash Question

Python 3.5 running in IDLE shell, but not Mac Terminal

I'm trying to get python 3.5 to run in my terminal. I made a script using idle that printed out the version of python in use to try to solve my problem. The script looked like this:

import sys

When I ran it in the IDLE shell I got this:

sys.version_info(major=3, minor=5, micro=2, releaselevel='final', serial=0)

When I ran it in my mac terminal I got this:

sys.version_info(major=2, minor=7, micro=10, releaselevel='final', serial=0)

I want to be able to run my scripts in terminal because I want to be able to access files and use pip. If you know how I can do one or both of these things in the IDLE shell, or you know how to update terminal so I can do this...please let me know.


To run idle from command line Type idle3 in the terminal for Python 3 idle and if you want to run Python 2 idle, type idle in the terminal .

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