ROOT Version: root_v6.24.06.win32.vc16 Platform: Win 10 - Family edition x64 Compiler: not sure
Hi,
I’m a pure newbie with Root.
I’d like to install Root and to later install Pyroot to be able to use Python with Root.
I’ve followed the steps described here : (can’t insert links) : root.cern dot install
Installed the required dependencies listed here : root.cern slash install slash dependencies
Cmake v 3.21.2 . msi (Windows x64 Installer)
Microsoft Visual C++ (Visual Studio for Windows)
Python 3.9
Installed the Root software [root_v6.24.06.win32.vc16.exe]
from here : root dot cern slash download slash root_v6.24.06.win32.vc16.exe
Unpacked the archive
And now I’m stuck, I don’t understand what the 4th step means, what I’m supposed to do :
“Add the ROOT libraries and executables to your environment by sourcing the appropriate thisroot.* script. These setup scripts can be found in the ROOT binary release, in the bin directory.”
Thank you very much for your quick reply.
I followed your steps, and after I entered the cmd, I get :
RegOpenKeyEx(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\$VERSION\InstallationFolder): returned 2: The specified file is not found
RegOpenKeyEx(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots\KitsRoot10): returned 2: The specified file is not found
input_line_1:1:10: fatal error: 'new' file not found
#include <new>
^~~~~
Replaced symbol atexit cannot be found in JIT!
Replaced symbol at_quick_exit cannot be found in JIT!
Replaced symbol __dllonexit cannot be found in JIT!
Replaced symbol _onexit cannot be found in JIT!
input_line_3:37:10: fatal error: 'string' file not found
#include <string>
^~~~~~~~
------------------------------------------------------------------
| Welcome to ROOT 6.24/06 |
| (c) 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for win32 on Sep 02 2021, 14:20:23 |
| From tags/v6-24-06@v6-24-06 |
| With MSVC 19.23.28107.0 |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------------
input_line_7:1:10: fatal error: 'iostream' file not found
#include <iostream>
And also, when I enter “import root” in the Python 3.9 cmd panel, I get
"Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'root'"
Usually these messages appear when there is no Windows 10 SDK (coming with Visual Studio) installed on the system. You installed Visual Studio, right? Did you select the “Desktop development with C++” option when installing Visual Studio? (the Windows 10 SDK is part of it)
Microsoft Windows [Version 10.0.19041.1237]
(c) Microsoft Corporation. All rights reserved.
C:\Users\bellenot>%comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.4.5
** Copyright (c) 2019 Microsoft Corporation
**********************************************************************
C:\Users\bellenot>C:\root\bin\thisroot.bat
C:\Users\bellenot>python
Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:04:37) [MSC v.1929 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
Traceback (most recent call last):
File "C:\root\bin\cppyy\__init__.py", line 60, in <module>
importlib.import_module(libcppyy_mod_name)
File "C:\Python39-32\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'libcppyy3_9'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\root\bin\ROOT\__init__.py", line 22, in <module>
import cppyy
File "C:\root\bin\cppyy\__init__.py", line 62, in <module>
raise ImportError(
ImportError: Failed to import libcppyy3_9. Please check that ROOT has been built for Python 3.9
>>>
As you can see in this example, it finds ROOT, but the Python version doesn’t match, so make sure also to have installed Python 3.8 (32 bit)