Attempting qtexample.py on windows the non-cygwin way

Hello,

I am developing a GUI using PyQt, and my analysis is based on ROOT and python tools. Everything on a windows 32 bit machine (sigh…).

This is what I have installed:

  • python 2.6.6, installed with .msi file for x86 machine
  • Qt 4.7.4
  • PyQt 4.8.5, installed with .exe for python v2.6, x86

Now, I would like to take full advantage of the ROOT Qt-layer, and installed the binaries with the Qt-layer activated, ROOT v5.24, available at root.bnl.gov/QtRoot/QtRoot.html. (I am unable to build ROOT from source following the non-cygwin approach.)

Trying to run example $ROOTSYS/tutorials/pyroot/qtexample.py, I got an error:

Traceback (most recent call last):
File “qtexample_original.py”, line 6, in
import ROOT
ImportError: No module named ROOT

Unexpected, given my environment variables setting:

PATH → C:\Python26;C:\vim73;C:\BNL\ROOT\bin;C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\bin;%PATH%
PYTHONPATH → C:\BNL\ROOT\bin;C:\BNL\ROOT\lib;C:\Python26;C:\Python26\Lib;C:\Python26\Lib\site-packages;%ROOTSYS%;%ROOTSYS%\bin;%ROOTSYS%\lib;%PYTHONPATH%
ROOTSYS → C:\BNL\ROOT

I would greatly appreciate any help.

Best,
Gustavo

Hi,

but were those binaries build with python support? That is, can you check for ROOT.py in $ROOTSYS/bin (or $ROOTSYS/lib)?

Cheers,
Wim

Dear Wim,

Thank you very much for your reply. I could not locate ROOT.py, hence I suppose the BNL binaries were not built with python support.

I have tried a few things:

First, I added the arguments ‘–enable-qt’ and ‘–enable-python’ for Gordon Watts’ ROOT builder, naively thinking it would do the job. It did not.

Then, I followed the instructions on “1. Full (aka Long and slow) installation” at root.bnl.gov/QtRoot/PyQtRoot.html.

Unfortunately, the process of building root using the INSTALL_QTROOT.sh script did not complete, giving me an error:

NMAKE : fatal error U1077: ‘“C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\cl.EXE”’ : return code ‘0xe0000135’


I really tried to follow the instructions, namely leaving C:\cygwin\Cygwin.bat unchanged, and including the Visual Studio 2008 bin directory in the PATH.

Do you have a suggestion on how to proceed?

Gustavo,

is there no more to the error message other than 'return code ‘0xe0000135’? (The images you appear to have tried to link reference your local C:-drive, so are not visible to the topic.)

How did you add the VS’08 envars? The instructions that I’ve been given are:"C:\Program Files\Microsoft Visual Studio .NET 2008\Common7\Tools\vsvars32.bat"

I’ve never been all that lucky with building on windows, but the main cause of problems used to be same-named executables mixed from cygwin (e.g. both VC and cygwin have a link.exe).

Cheers,
Wim