Problem with pyroot on windows

I just moved to windows os and installed root as suggested.
I whave some python code using pyroot and if I run the code from windows just by double click everything look ok. I also have cygwin though and if I run from an xterm sh shell I get that it takes the wrong path (2.5 rather than 2.6).

correct path if I double click:
[‘h:\testcode’, ‘C:\Python26\lib\site-packages\nose-0.11.3-py2.6.egg’, ‘C:
\root\bin’, ‘C:\Python26\’, ‘C:\Python26\DLLs’, ‘C:\Python26\
lib’, ‘C:\Python26\lib\plat-win’, ‘C:\Python26\lib\lib-tk’, ‘C:\Python26’
, ‘C:\Python26\lib\site-packages’, ‘C:\Python26\lib\site-packages\PIL’, ‘
C:\Python26\lib\site-packages\win32’, ‘C:\Python26\lib\site-packages\win
32\lib’, ‘C:\Python26\lib\site-packages\Pythonwin’]

wrong path from xterm:

[’/cygdrive/h/testcode’, ‘/usr/lib/’, ‘/usr/lib/python2.5’, ‘/usr/lib/python2.5/plat-cygwin’
, ‘/usr/lib/python2.5/lib-tk’, ‘/usr/lib/python2.5/lib-dynload’, ‘/usr/lib/python2.5/site-packages’]

How do I change this so that I can run from the xterm ?

What I did so far was to incclude the path by hand via the python append command:


Unfortunately althou it seemds ti be pointing in the right place it gives me another problem:

Traceback (most recent call last):
File “”, line 22, in
from ROOT import *
File “C:\root\bin/”, line 85, in
import libPyROOT as _root

please can someone help with one or the other problem (or both :slight_smile:)?


It seems your mixing two versions of ROOT. If you want to use the native version of root (e.g. root_v5.28.00.win32.vc90.tar.gz), you cannot (or should not) run it from xterm. The version of ROOT working from within a X/xterm session is the cygwin/gcc one (e.g. Cygwin GCC 4.3: root_v5.28.00.win32gcc-gcc-4.3.tar.gz).

Cheers, Bertrand.