Currently, I am trying to upgrade some of my programs from python2 to python3. When compiling ROOT, I can select which version of python to compile against. However, whichever one that I choose, I get a rather nasty ImportError when trying to import it with the other version of python.
[code]Python 3.4.2 (default, Oct 8 2014, 10:45:20)
[GCC 4.9.1] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
Traceback (most recent call last):
File “”, line 1, in
File “/mnt/misc/sw/x86_64/Debian/8/root/gnu/5.34.32/lib/ROOT.py”, line 103, in
import libPyROOT as _root
ImportError: dynamic module does not define init function (PyInit_libPyROOT)
I want to recompile only the python-specific parts of ROOT, so that I can have two separate versions of libPyROOT.so, and can choose which one to import. How do I compile ROOT against multiple versions of python, so that libPyROOT.so will be generated for each version of python?