Problem with pyroot on windows

Hello,
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\python26.zip’, ‘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/python25.zip’, ‘/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:

sys.path.append(‘h:\testcode’)
sys.path.append(‘C:\Python26\lib\site-packages\nose-0.11.3-py2.6.egg’)
sys.path.append(‘C:\root\bin’)
etc.

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

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

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

Hi,

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.