2

I installed root.exe in the folder C:\root_v5.34.36, folder C:\root_v5.34.36\bin which contains ROOT.py

When I started a Jupiter Notebook (anaconda), I write :

import sys
sys.path.append("C:\root_v5.34.36\bin")

Then

import ROOT

And it displays :

ImportError                               Traceback (most recent call last)
<ipython-input-2-b332e25ada1f> in <module>()
----> 1 import ROOT

ImportError: No module named ROOT

What's wrong?

mtzl
  • 404
  • 2
  • 13
eleicht
  • 35
  • 3

2 Answers2

2

Try changing the root bin path to sys.path.append("C:\\root_v5.34.36\\bin")

Noe Fernandez
  • 114
  • 1
  • 4
  • Seems to be the solution, thanks! Right now, I've got new problem... "ImportError: DLL load failed: %1 isn't a valid win32 application." – eleicht May 04 '16 at 09:33
  • Check this : [ImportError: DLL load failed: %1 is not a valid Win32 application. But the DLL's are there](http://stackoverflow.com/questions/19019720/importerror-dll-load-failed-1-is-not-a-valid-win32-application-but-the-dlls) . It seems to be the same problem – Noe Fernandez May 04 '16 at 09:47
  • Find an easier way => install anaconda 32 bits on my 64 bits OS, thanks! – eleicht May 04 '16 at 09:58
0

You need to run the file thisroot.bat usually found in the config folder of the ROOT directory before starting the notebook application.

This should be done by opening a powershell and typing:

cd  C:\root_v5.34.36
.\config\thisroot.bat
C:\WhereverTheJupyterNotebookApplicationIs\JupyterNotebook.exe
Nathanael Farley
  • 400
  • 3
  • 19