Pyroot import failed (DLL load failed) on new Windows installation

Fresh root_v6.14.06.win32.vc15.debug installation. Failed to load libPyROOT.

Python is Anaconda python 3.7.1

ipython
Python 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)]
Type ‘copyright’, ‘credits’ or ‘license’ for more information
IPython 7.2.0 – An enhanced Interactive Python. Type ‘?’ for help.

n [4]: sys.path
Out[4]:
[‘c:\Anaconda3\Scripts’,
‘C:\root614\bin’,
‘C:\root614’,
‘c:\Anaconda3\python37.zip’,
‘c:\Anaconda3\DLLs’,
‘c:\Anaconda3\lib’,
‘c:\Anaconda3’,
‘’,
‘c:\Anaconda3\lib\site-packages’,
‘c:\Anaconda3\lib\site-packages\win32’,
‘c:\Anaconda3\lib\site-packages\win32\lib’,
‘c:\Anaconda3\lib\site-packages\Pythonwin’,
‘c:\Anaconda3\lib\site-packages\IPython\extensions’,
‘C:\Users\Charles Plager\.ipython’]

In [5]:

In [5]: import ROOT

ImportError Traceback (most recent call last)
in
----> 1 import ROOT

C:\root614\bin\ROOT.py in
22 ### system and interpreter setup ------------------------------------------------
23 import os, sys, types
—> 24 import cppyy
25
26

C:\root614\bin\cppyy.py in
59 sys.setdlopenflags( 0x100 | 0x2 ) # RTLD_GLOBAL | RTLD_NOW
60
—> 61 import libPyROOT as _backend
62
63 # reset dl flags if needed

ImportError: DLL load failed: %1 is not a valid Win32 application.

Any ideas?

Thanks, Charles


_ROOT Version: root_v6.14.06.win32.vc15.debug
_Platform: windows
_Compiler: vc15 (which I hope is VS2017)


Am I correct that the Windows builds are 32 bit and not 64 bit?

If so, why? (???)

@bellenot will surely be able to answer these questions.

Hi,

PyROOT is currently not working on Windows, but we’re working on it.

Correct. There will be quite intrusive changes in ROOT to make it working on Windows 64 bit (mostly due to many conversions from pointer to long), but we’ll be working on that as well.

Cheers, Bertrand.

So I need to use 32 bit Python, not 64 bit Python to get PyRoot working, correct?

As I said, PyROOT doesn’t work at all on Windows

Sorry, I missed that part.

Are there plans to have it work on Windows?

Obviously! :blush: We’re working on it…

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.