Set the python executable

Hello, I’m trying to compile PyROOT on a machine where the default Python version is 3.2. The python executable is a symlink pointing to 3.2 but I also have a python2 link ponting to 2.7. Is it possible to configure the build to use python2 instead of python? Or do I have to search for every invocation of python and replace it with python2?


you can point the configure script to the proper places with --with-python-incdir and --with-python-libdir. However, the script picks up the python version from the executable called “python” that is in the path, so unless the shared library in libdir is called (i.e. w/o version), that could fail. Note that other than the buffer interface, the bulk of PyROOT should work with p3, although I don’t think anyone is actually using p3 atm.


Thanks for the reply. I get some errors when trying to use python 3 (some scripts are not compatible with python 3, I think), that’s why I was asking whether it is possible to explicitly set the python executable. I think I’ll have to make some dirty hack…