I’m trying to run a python script but I keep getting a continuous error when simply importing root.
Here’s my code:
print "Importing stuff" import sys sys.path.append('C:\root_v5.34.36\bin') sys.path.insert(1, 'C:\root_v5.34.36\bin') #9/16/16 Added to work on windows? import optparse import os import ROOT from math import exp, sqrt, log
The two system commands were added to attempt to fix the problem. There error message I’m getting when I try to run the script is
Importing stuff Traceback (most recent call last): File "F:\analyze_pulse_shape.py", line 9, in <module> import ROOT File "C:\root_v5.34.36\bin\ROOT.py", line 103, in <module> import libPyROOT as _root ImportError: DLL load failed: %1 is not a valid Win32 application.
I checked to make sure the libPyROOT DLL was in the C:\root_v5.34.36\bin\ folder and it indeed was. I know that other files in my root directory are fine because I run other root things on my machine but with C++.
I have read some things about the idea that it could be a conflict between 64 bit and 32 bit OS but I’m not confident that is the issue because at one point this code worked on the machine I am using. Also, I am running Windows 7 64 Bit.
Thank you for your help.