domingo, 17 de abril de 2011

Switching between python versions in OSX

I just needed to test something with python 2.7 in my osx.
I used Mac ports in the following way:

Install python 2.7:
sudo port install python27


Install python_select:
sudo port install python_select


Check the available versions doing:
sudo python_select -l


In my case the output was:

$ sudo python_select -l
Available versions:
current none python26 python26-apple python27


Changed my python version doing:
sudo python_select python27



That's it!
$ python --version
Python 2.7.1

No hay comentarios: