Joon. P Joon. P - 2 months ago 13
Python Question

terminal runs python 2.7 when I have python 3.5 installed on mac.

I was installing, uninstalling and reinstalling pythons on my mac,
and I think things are screwed up a little.

At first by default, terminal ran Python 3.5 when I typed


, but after doing some things, it installed 2.7 and now the terminal runs python 2.7 instead of 3.5

I installed python 3.5 form

When I open up bash_profile

$vim ~/.bash_profile

This is what shows up

# virtualenv
export WORKON_HOME=~/.virtualenvs
source /usr/local/bin/

# Setting PATH for Python 3.5
# The orginal version is saved in .bash_profile.pysave
export PATH

Now when I type:

$ python

This shows up:

Python 2.7.11 (default, Jun 23 2016, 17:25:20)
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

How can I reset all the python stuff(remove older versions, etc) to the factory version that i had when I first bought Mac(python3.5)?


This worked for me:

Python 3.x


Python 2.x


in terminal