I am running python on Macbook Air and I realized that I have many versions of python installed available via multiple paths
hhimanshu@air~ - 11:43:51 $ which python
python is /Users/hhimanshu/.virtualenvs/envs/bi/bin/python
python is /Library/Frameworks/Python.framework/Versions/Current/bin/python
python is /opt/local/bin/python
python is /usr/bin/python
(bi)hhimanshu@air~ - 11:56:54 $ /Users/hhimanshu/.virtualenvs/envs/bi/bin/python --version
Python 2.7.2
(bi)hhimanshu@air~ - 11:57:03 $ /Library/Frameworks/Python.framework/Versions/Current/bin/python --version
Python 2.7.3 -- EPD_free 7.3-2 (32-bit)
(bi)hhimanshu@air~ - 11:57:13 $ /opt/local/bin/python --version
Python 2.7.3
(bi)hhimanshu@air~ - 11:57:22 $ /usr/bin/python --version
Python 2.7.2
My $PATH value looks like
(bi)hhimanshu@air~ - 11:57:28 $ echo $PATH
/Users/hhimanshu/.virtualenvs/envs/bi/bin:/Users/hhimanshu/.pythonbrew/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/Users/hhimanshu/.rvm/gems/ruby-1.9.2-p318/bin:/Users/hhimanshu/.rvm/gems/ruby-1.9.2-p318@global/bin:/Users/hhimanshu/.rvm/rubies/ruby-1.9.2-p318/bin:/Users/hhimanshu/.rvm/bin:/Users/hhimanshu/.rbenv/shims:/Users/hhimanshu/.rbenv/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/mongodb/bin:/usr/local/sbin:/usr/local/mysql/bin:/Users/hhimanshu/.ec2/bin
I see issue because when I use virtualenv and see what python version I have, I see
$ yolk -l
Python - 2.7.2 - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload)
pip - 1.2.1 - active
setuptools - 0.6c11 - active
wsgiref - 0.1.2 - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7)
yolk - 0.4.3 - active
But what I need is
$ /Library/Frameworks/Python.framework/Versions/Current/bin/python --version
Python 2.7.3 -- EPD_free 7.3-2 (32-bit)
How can I fix my environment?
Following command will help you.
and check whether path is updated or not.
Or you can edit the respective configuration (.profile in home directory) file for permanent change in Mac OS. (In Unix system there is a file named .bash_profile which should be edited)