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
$python
, 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 http://python.org/.
When I open up bash_profile
$vim ~/.bash_profile
This is what shows up
# virtualenv
export WORKON_HOME=~/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
# Setting PATH for Python 3.5
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
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)?
$PATH/usr/bincalledpython3which points to the real python 3 binary. I then use the#!line to use python3. You contradict yourself. First you say "I installed python 3.5 form python.org", but at the end you say "the factory version that i had when I first bought Mac(python3.5)". It is more than likely that 2.7 was installed. 3.5 and 2.7 can co-exist quite happily on OS X if you use the symbolic link.