So I have 2 versions of python on my mac: 2.7.5 , 2.7.8
When I type python
in my terminal the 2.7.5
interpreter opens up and when I do /opt/local/bin/python2.7
in my terminal 2.7.8
interpreter opens up.
How do I make it so that when I type python
in terminal the 2.7.8
version opens up? Also when I run/compile a python code by typing python test.py
it should be done using 2.7.8
?
PS :- I didn't realise until recently that I had 2.7.8
on my macbook. I have installed a lot of modules using easy_install and was wondering if all of these will work with 2.7.8
version too?
UPDATE:
i found out that macs use .profile instead of bash_profile. When I open up my .profile file, I see the following :
# MacPorts Installer addition on 2014-03-04_at_12:15:52: adding an appropriate $
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
**Update 2 : **
I have tried all solutions listed here : How to: Macports select python
and none work for me