[CMake] Choose Python version on OS X

Robert Haines rhaines at manchester.ac.uk
Tue Feb 10 12:21:53 EST 2009


> What is the best way to have my own Python version detected?
>
> What is the rule cmake uses to choose the Python installation to use?

What I do is that I have the python_select package installed and then / 
opt/local/bin in my path before /usr/bin. Then you can select which  
python you want with that and CMake will pick it up.

Eg:

List versions available:
$ python_select -l
Available versions:
current none python24 python25-apple

See what is currently selected:
$ python_select -s
python25-apple

Select a different version:
$ sudo python_select python24

Note there is also an equivalent gcc_select tool.

Cheers,
Rob



More information about the CMake mailing list