I am trying to get a working set of root and PyROOT, working under Windows XP. I think I have things set up right, and have installed the win32gcc version of ROOT (4.02)
dkaufman@minsk /cygdrive/c/root
$ python
Python 2.4 (#1, Dec 4 2004, 20:10:33)
[GCC 3.3.3 (cygwin special)] on cygwin
Type “help”, “copyright”, “credits” or “license” for more information.
import ROOT
Traceback (most recent call last):
File “”, line 1, in ?
File “/cygdrive/c/root/lib/ROOT.py”, line 39, in ?
from libPyROOT import *
ImportError: No module named libPyROOT
Hi Duane,
the error message you get is wrong :-] The cygwin binaries cannot work with python 2.4; libPyROOT depends on libpython2.3.dll (“cygcheck $ROOTSYS/bin/libPyROOT.dll” tells you).
You have two options: downgrade your cygwin installation to python 2.3 (if still available), or build the root binaries from sources yourself. There’s even some documentation on that - even though it’s very easy nowadays. For my root build (cvs version, same python 2.4 as you have) python works without any problems.
Axel.
Hi Duane,
I can reproduce this - I haven’t updated my ROOT sources for a few days, now that I have I see the same problem. It’s a name decoration mismatch, which for some symbolds doesn’t get resolved. While I’m trying to find out how to fix that, calling ./configure --disable-opengl will allow the build to go through. As I said, I’m trying to resolve the issue; this is really only a work-around.
Axel.
Now, I wouldn’t recommend it, but it would work if you symlink your libpython2.4.dll as libpython2.3.dll (you’d get a pesky warning message, but there are no API incompatibilities that I know of). However, in your PYTHONPATH:
you’re probably better off removing “/usr/lib/python2.2” (python2.4, as you run it, will be able to find its own modules by itself).
Finally, this error message:
[quote] from libPyROOT import *
ImportError: No module named libPyROOT
[/quote]
really does mean what it says (if it can’t resolve the dependent libraries, it’ll tell you), so please check whether or not the libPyROOT.so file can be located through your PYTHONPATH. That is, whether or not it is installed in “/cygdrive/c/root/lib”?
Duh, … I do it occasionally on linux when I’m too lazy to reconfigure and rebuild for another version of python. I wasn’t aware of the differences on windows.
[quote=“Axel”]Hi Duane,
I can reproduce this - I haven’t updated my ROOT sources for a few days, now that I have I see the same problem. It’s a name decoration mismatch, which for some symbolds doesn’t get resolved. While I’m trying to find out how to fix that, calling ./configure --disable-opengl will allow the build to go through. As I said, I’m trying to resolve the issue; this is really only a work-around.
Axel.[/quote]
Ah! good (it isn’t just me)!
Yes, disabling opengl did the trick. Good for now,
Hi Duane,
the fix for opengl on win32gcc is in CVS. Thanks for reporting the problem.
Make sure you have the cygwin packages opengl and freeglut installed, “cvs -z3 up”, re-run your ./configure line (without the disable-opengl switch; you can find your current configure params in config.status), then “make gl-clean”, “make”.
Axel.
[quote=“Axel”]Hi Duane,
the fix for opengl on win32gcc is in CVS. Thanks for reporting the problem.
Make sure you have the cygwin packages opengl and freeglut installed, “cvs -z3 up”, re-run your ./configure line (without the disable-opengl switch; you can find your current configure params in config.status), then “make gl-clean”, “make”.
Axel.[/quote]