PyROOT for root 5.28/00c

Hallo!

I have installed python 2.6.6 and root 5.28/00c (Apr 15 2011) msi for windows XP. The pyroot tutorials do not work. I get the following error message:

Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32
Type “copyright”, “credits” or “license()” for more information.

****************************************************************
Personal firewall software may warn about the connection IDLE
makes to its subprocess using this computer's internal loopback
interface.  This connection is not visible on any external
interface and no data is sent to or received from the Internet.
****************************************************************

IDLE 2.6.6 ==== No Subprocess ====

Traceback (most recent call last):
File “C:\root\tutorials\pyroot\h1draw.py”, line 4, in
from ROOT import TCanvas, TPad, TFile, TPaveLabel, TPaveText
File “C:\root\bin\ROOT.py”, line 85, in
import libPyROOT as _root
ImportError: DLL load failed: The specified module could not be found.

I have installed python 2.6.6 and root 5.28/00 (Dec 14 2010) msi for windows XP on another pc and everything works fine. The environmental variables are the same. I do not understand the problems.
May you be so kind to help me?
May I still download the version root 5.28/00 (Dec 14 2010) msi? Where?
Many thanks in advance.

Best Regards,
luca

Hi,

first questions would be what PYTHONPATH looks like, whether it has $ROOTSYS/bin in there, whether paths are properly translated (cygwin v.s. windows conventions), and of course whether libPyROOT.pyd actually lives in $ROOTSYS/bin?

Cheers,
Wim

Hallo Wim,
Thank you for your prompt answer.

PATH
C:\root\bin;\F\G77\bin;%PATH%;%ROOTSYS%\bin

PYTHONPATH
C:\root\bin;C:\root\lib;C:\Python26;%ROOTSYS%\bin;%PYTHONPATH%

There are repetitions since I have just implemented what suggested in a different post.

libPyROOT.pyd actually lives in C:\root\bin
libPyROOT.lib is in C:\root\lib

Thank you,
luca

Luca,

that all looks correct then …

I grabbing at straws here, but does libPyROOT.pyd have the right size (I think libPyROOT.dll should sit along side it and have the same size)? I’ve seen it come up with size 0 on some of my own builds (although I understand you have a packaged install, but like I said, grabbing at straws since I’ve no idea what else could go wrong).

Cheers,
Wim

Hallo Wim,
Thanks again!

libPyROOT.lib in C:\root\lib is 2.720 KB while in C:\root\bin libPyROOT.dll is 900 KB and libPyROOT.pyd is 4 KB.
Tomorrow I am going to check on my other pc.
Thank you for the help,
luca

Luca,

4KB sounds definitely too small, unless it is a symlink to libPyROOT.dll. An option would be to copy libPyROOT.dll to libPyROOT.pyd (even if it’s a link, as it may be that the interpreter can’t follow it for some reason).

Cheers,
Wim

Hallo Wim!

I have tried your suggestions but it did not work.
I have checked on the other pc and the root folder in C: is 20 KB larger (root 5.28/00, Dec 14 2010) than the one of version root 5.28/00c, Apr 15 2011. So I have copied it into the slimmer one and now the most of the pyroot tutorials works and my python script with root graphics does not crash.
Is there an issue with the msi install package of version 00c?

Thank you once more for your help,
luca

Luca,

can’t say that 20KB is not a result of the different versions. As for the .msi being broken, might have happened during the download or install as well. I’ll ask Bertrand.

Cheers,
Wim

Hi,

I took the msi file (ftp://root.cern.ch/root/root_v5.28.00c.win32.vc90.msi) and I don’t see any problem:

[code]C:\home\bellenot\root\tutorials\pyroot>python
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on
win32
Type “help”, “copyright”, “credits” or “license” for more information.

execfile(“h1draw.py”)
TFile** hsimple.root Demo ROOT file with histograms
TFile* hsimple.root Demo ROOT file with histograms
KEY: TH1F hpx;1 This is the px distribution
KEY: TH2F hpxpy;1 py vs px
KEY: TProfile hprof;1 Profile of pz versus px
KEY: TNtuple ntuple;1 Demo ntuple

[/code]
Cheers, Bertrand.

Dear Bertrand,

Thank you very much! Perfect!
My faulty installation was with root_v5.28.00c.win32.msi.
Many thanks once more.

Best Regards,
luca

The same problem in 5.30/00 on Windows XP x86 with Python 2.6.5.
But 5.30.00.win32.vc90.msi works with Python(x,y) 2.6.

P.S. Why vc71 version is recommended while vc90 is not?

When I try the latest 5.34.01 win32.vc90 on Windows 7 64-bit with Python 2.7.2 (from Pythonxy suite 2.7), the same ImportError appears again. I guess, the compiled version for windows may work with python 2.6. I think, it’s better to announce the proper working Python version for Windows Users.


Problem confirmed. I installed a 2.6.6 python and succeeded to import ROOT module.
So, the best combination now is ROOT win32.vc90 with python 2.6. If you are using Pythonxy 2.6 (with python 2.6) or other 2.6 version python suite, DO NOT upgrade your python suite, or you will not load ROOT module.