Root Installation (WINDOWS 11)

I want to use PyRoot for my M.Sc. Project in High Energy Physics. I have installed cmake in my D drive and extracted the file contents into a folder named ROOT in the D drive. I have installed Visual Studio 2022. and I have Python 3 installed in my system. Can anyone guide me what to do next. I am currently using Windows 11.

Welcome to the ROOT Forum!
To use ROOT, you have to start from a Developer Command Prompt for VS2022, then call D:\ROOT\bin\thisroot.bat to properly set the environment variables, then you can start using ROOT by typing root or PyROOT by starting Python and import ROOT in the Python environment

how to start from a developer command prompt for VS2022 and how to call the D:\ROOT\bin\thisroot.bat from there. I am totally a newbie and have very less knowledge on how to use this. If you could guide me, I would remain grateful for your help.

OK, so let’s start from the beginning. Can you describe exactly what you’ve done so far? I.e. What you downloaded and how/where you installed stuff?

So it was my F drive sorry. I saw on google what developer command prompt was and I used it and I can see something like this

OK, fine. But can you give the information I asked for?

so downloaded cmake files in my F drive and then I installed VS 2022 on my system… and opened a new project for VS in the same drive as that of cmake files. And I did install Python3(installed in C Drive) a year back.

So you did not install ROOT? Then please follow Installing ROOT - ROOT

image So I went here…
image
Should I download the Source distribution or from binary(x64bit versions) distribution?

Try to use a binary x64 distribution, it will be much simpler


which one to download?

This one: root_v6.30.06.win64.vc17.zip

Its a Zip file right, so after downloading I should extract the files in the same drive as that of cmake (F: drive)

Yes, it’s a zip file. Extract the file anywhere you want

1 Like

Okay, what to do after I have extracted the files?

Now you can use ROOT, and as I said, to use ROOT, you have to start from a Developer Command Prompt for VS2022 , then call F:\ROOT\root\bin\thisroot.bat (or wherever you unzipped the zip file) to properly set the environment variables, then you can start using ROOT by typing root or use PyROOT by starting Python and import ROOT in the Python shell
And I would advise to start from Get Started - ROOT and in particular ROOT Primer - ROOT


im seeing this

**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.10.0
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************

F:\ROOT\PythonApplication1>F:\ROOT\root\bin\thisroot.bat

F:\ROOT\PythonApplication1>root
   ------------------------------------------------------------------
  | Welcome to ROOT 6.30/06                        https://root.cern |
  | (c) 1995-2024, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for win64 on Apr 03 2024, 06:35:12                         |
  | From tags/v6.30.06-0-g4f4e716372@v6.30.06-0-g4f4e716372          |
  | With MSVC 19.39.33521.0                                          |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------

root [0]

Or, with python:

**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.10.0
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************

F:\ROOT\PythonApplication1>F:\ROOT\root\bin\thisroot.bat

F:\ROOT\PythonApplication1>python
Python 3.11.4 (tags/v3.11.4:d2340ef, Jun  7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
>>>

when I am using this I am getting this output