How to make python_select work for '$>python' command?

Posted by Jim on Stack Overflow See other posts from Stack Overflow or by Jim
Published on 2009-11-20T07:23:12Z Indexed on 2010/03/23 3:51 UTC
Read the original article Hit count: 358

Filed under:
|
|

I installed a couple of pythons in different versions with macports, and the apple python 2.6 is also working. Now I need to run a program which requires MySQLdb package support in python, and this package was installed to the python I installed by macports. The program tells me that there is no MySQLdb installed, so I guess it is the apple python working for that program.

I searched for some help and found python_select for switching between pythons. However after the command

$>sudo python_select python25

told me that it selected the version "python25" for python, when I type

$>python

it is still apple python 2.6 that launches.

The question is that how can I make python25(the one with MySQLdb) work for the program rather than apple python?

Another important thing, the program is NOT a .py file and needs to be compiled before running. So do I need to re-install this program? My Mac OS version is Snow Leopard 10.6.

Any answer is appreciated.

© Stack Overflow or respective owner

Related posts about python

Related posts about osx