# CERN ROOT on Windows

**URL:** <https://root-forum.cern.ch/t/cern-root-on-windows/64947>\
**Category:** Newbie\
**Created:** [July 21, 2026, 7:38am UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947 "2026-07-21T07:38:49Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![johanr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/johanr/32/39968_2.png) [@johanr](https://root-forum.cern.ch/u/johanr)\
**Post date:** [July 21, 2026, 7:38am UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/1 "2026-07-21T07:38:50Z")

</div>

Hi, I just learnt about CERN ROOT. My question is, can I use it with C++ in Jupyther notebooks on Windows?

Thank you  
Johan

* * *

---

<div class="post-metadata">

**Author:** ![StephanH](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@StephanH](https://root-forum.cern.ch/u/StephanH)\
**Post date:** [July 21, 2026, 7:47am UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/2 "2026-07-21T07:47:40Z")

</div>

Hello,

I believe you can, but I’ll call on the expertise of @bellenot here.

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [July 21, 2026, 8:02am UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/3 "2026-07-21T08:02:11Z")

</div>

Yest it works. But note that you may have to build ROOT from source…

---

<div class="post-metadata">

**Author:** ![johanr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/johanr/32/39968_2.png) [@johanr](https://root-forum.cern.ch/u/johanr)\
**Post date:** [July 21, 2026, 8:53am UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/4 "2026-07-21T08:53:20Z")

</div>

@bellenot As I understand it ROOT uses Xeus and Cling and these do not work in Jupyther notebooks on Windows. How come it does work?

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [July 21, 2026, 8:54am UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/5 "2026-07-21T08:54:51Z")

</div>

I don’t know about Xeus, but `root --notebook` on Windows works

---

<div class="post-metadata">

**Author:** ![johanr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/johanr/32/39968_2.png) [@johanr](https://root-forum.cern.ch/u/johanr)\
**Post date:** [July 21, 2026, 8:57am UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/6 "2026-07-21T08:57:47Z")

</div>

@bellenot Where can I find more detailed instructions?

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [July 21, 2026, 9:01am UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/7 "2026-07-21T09:01:01Z")

</div>

Build ROOT from source, as described here:

> **[Building ROOT from source](https://root.cern/install/build_from_source/)**
>
> Data Analysis Framework

With Python and notebook installed, then just start `root --notebook`:

```auto
C:\root-dev\build\x64\relwithdebinfo>root --notebook

C:\root-dev\build\x64\relwithdebinfo>[I 2026-07-21 10:55:41.519 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2026-07-21 10:55:41.530 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2026-07-21 10:55:41.538 ServerApp] jupyterlab | extension was successfully linked.
[W 2026-07-21 10:55:41.542 JupyterNotebookApp] 'extra_static_paths' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[I 2026-07-21 10:55:41.546 ServerApp] notebook | extension was successfully linked.
[I 2026-07-21 10:55:42.980 ServerApp] notebook_shim | extension was successfully linked.
[I 2026-07-21 10:55:43.093 ServerApp] notebook_shim | extension was successfully loaded.
[I 2026-07-21 10:55:43.096 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2026-07-21 10:55:43.098 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2026-07-21 10:55:43.107 LabApp] JupyterLab extension loaded from C:\Python314\Lib\site-packages\jupyterlab
[I 2026-07-21 10:55:43.107 LabApp] JupyterLab application directory is C:\Python314\share\jupyter\lab
[I 2026-07-21 10:55:43.108 LabApp] Extension Manager is 'pypi'.
[I 2026-07-21 10:55:43.288 ServerApp] jupyterlab | extension was successfully loaded.
[I 2026-07-21 10:55:43.296 ServerApp] notebook | extension was successfully loaded.
[I 2026-07-21 10:55:43.299 ServerApp] Serving notebooks from local directory: C:\root-dev\build\x64\relwithdebinfo
[I 2026-07-21 10:55:43.300 ServerApp] Jupyter Server 2.20.0 is running at:
[I 2026-07-21 10:55:43.301 ServerApp] http://localhost:8888/tree?token=85d0e8c1b0cba019dad9698e74fa4e02d932f7aec2fa1bf6
[I 2026-07-21 10:55:43.304 ServerApp] http://127.0.0.1:8888/tree?token=85d0e8c1b0cba019dad9698e74fa4e02d932f7aec2fa1bf6
[I 2026-07-21 10:55:43.306 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2026-07-21 10:55:43.381 ServerApp]

    To access the server, open this file in a browser:
        file:/C:/Users/bellenot/AppData/Roaming/jupyter/runtime/jpserver-36756-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/tree?token=85d0e8c1b0cba019dad9698e74fa4e02d932f7aec2fa1bf6
        http://127.0.0.1:8888/tree?token=85d0e8c1b0cba019dad9698e74fa4e02d932f7aec2fa1bf6

```

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/e/4/e4986efb93d54d87a6415ba8287abae77d6fa96b.png)

---

<div class="post-metadata">

**Author:** ![johanr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/johanr/32/39968_2.png) [@johanr](https://root-forum.cern.ch/u/johanr)\
**Post date:** [July 21, 2026, 9:02am UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/8 "2026-07-21T09:02:54Z")

</div>

@bellenot Are these instructions for plain Windows or for Windows + WSL?

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [July 21, 2026, 9:06am UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/9 "2026-07-21T09:06:13Z")

</div>

Native Windows with Visual Studio. No WSL. But note that you can also use WSL if you want…

---

<div class="post-metadata">

**Author:** ![johanr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/johanr/32/39968_2.png) [@johanr](https://root-forum.cern.ch/u/johanr)\
**Post date:** [July 21, 2026, 9:07am UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/10 "2026-07-21T09:07:50Z")

</div>

I prefer not to use WSL. This sounds great!! I will try it out!

---

<div class="post-metadata">

**Author:** ![johanr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/johanr/32/39968_2.png) [@johanr](https://root-forum.cern.ch/u/johanr)\
**Post date:** [July 22, 2026, 3:51pm UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/12 "2026-07-22T15:51:22Z")

</div>

I tried to build ROOT from sources but I ran into difficulties with 3rd party libraries.

I have Visual Studio 2022 and the vcpkg package manager installed. I downloaded and extracted root\_v6.40.02.source.tar.gz. Then I ran the command

> cmake -G “Visual Studio 17 2022” -A x64 -T host=x64 -DCMAKE\_INSTALL\_PREFIX=“C:/Root/root-6.40.02-install” -B “C:/Root/root-6.40.02-build” “C:/Root/root-6.40.02-source”

This resulted in several error messages like

> -- Could NOT find ZLIB (missing: ZLIB\_LIBRARY ZLIB\_INCLUDE\_DIR)

Then I cleaned the build cache and tried the command

> cmake -G “Visual Studio 17 2022” -A x64 -T host=x64 -DCMAKE\_TOOLCHAIN\_FILE=“C:/Libraries/vcpkg/scripts/buildsystems/vcpkg.cmake” -DVCPKG\_TARGET\_TRIPLET=x64-windows -DCMAKE\_INSTALL\_PREFIX=“C:/Root/root-6.40.02-install” -B “C:/Root/root-6.40.02-build” “C:/Root/root-6.40.02-source”

with the additional the options

> -DCMAKE\_TOOLCHAIN\_FILE=“C:/Libraries/vcpkg/scripts/buildsystems/vcpkg.cmake”  
> -DVCPKG\_TARGET\_TRIPLET=x64-windows

These tell CMake to get 3rd party libs from vcpkg. Now the 3rd party libs were found, but I got the strange error message

> CMake Error at C:/Libraries/vcpkg/scripts/buildsystems/vcpkg.cmake:820 (if):  
> Maximum recursion depth of 1000 exceeded  
> Call Stack (most recent call first):  
> C:/Libraries/vcpkg/scripts/buildsystems/vcpkg.cmake:939 (\_find\_package)  
> C:/Libraries/vcpkg/scripts/buildsystems/vcpkg.cmake:939 (\_find\_package)  
> C:/Libraries/vcpkg/scripts/buildsystems/vcpkg.cmake:939 (\_find\_package)  
> C:/Libraries/vcpkg/scripts/buildsystems/vcpkg.cmake:939 (\_find\_package)  
> C:/Libraries/vcpkg/scripts/buildsystems/vcpkg.cmake:939 (\_find\_package)  
> C:/Libraries/vcpkg/scripts/buildsystems/vcpkg.cmake:939 (\_find\_package)  
> C:/Libraries/vcpkg/scripts/buildsystems/vcpkg.cmake:939 (\_find\_package)  
> C:/Libraries/vcpkg/scripts/buildsystems/vcpkg.cmake:939 (\_find\_package)  
> C:/Libraries/vcpkg/scripts/buildsystems/vcpkg.cmake:939 (\_find\_package)  
> C:/Libraries/vcpkg/scripts/buildsystems/vcpkg.cmake:939 (\_find\_package)  
> C:/Libraries/vcpkg/scripts/buildsystems/vcpkg.cmake:939 (\_find\_package)  
> C:/Libraries/vcpkg/scripts/buildsystems/vcpkg.cmake:939 (\_find\_package)  
> …  
> C:/Libraries/vcpkg/scripts/buildsystems/vcpkg.cmake:939 (\_find\_package)  
> cmake/modules/SearchInstalledSoftware.cmake:134 (\_find\_package)  
> cmake/modules/SearchInstalledSoftware.cmake:93 (find\_package)  
> cmake/modules/SearchInstalledSoftware.cmake:177 (ROOT\_FIND\_REQUIRED\_DEP)  
> CMakeLists.txt:134 (include)

I have attached complete build logs for both attempts. How do I proceed?

[build-log-1.txt](https://root-forum.cern.ch/uploads/short-url/t8yGZotTf3z3sfE5iPs2cC2581S.txt) (6.9 KB)

[build-log-2.txt](https://root-forum.cern.ch/uploads/short-url/5uJUNgThAFGGdwdeVP0XVN1u8bS.txt) (78.1 KB)

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [July 23, 2026, 6:18am UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/13 "2026-07-23T06:18:02Z")

</div>

Don’t use `DCMAKE_TOOLCHAIN_FILE` and `VCPKG_TARGET_TRIPLET`. Try with:

```auto
cmake -G"Visual Studio 17 2022" -A x64 -Thost=x64 -Dbuiltin_freetype=ON -Dbuiltin_ftgl=ON -Dbuiltin_gif=ON -Dbuiltin_gl2ps=ON -Dbuiltin_jpeg=ON -Dbuiltin_png=ON -Dbuiltin_gtest=ON -Dbuiltin_lzma=ON -Dbuiltin_lz4=ON -Dbuiltin_pcre=ON -Dbuiltin_tiff=ON -Dbuiltin_unuran=ON -Dbuiltin_xxhash=ON -Dbuiltin_zlib=ON -Dbuiltin_zstd=ON -DCMAKE_INSTALL_PREFIX=“C:/Root/root-6.40.02-install” -B “C:/Root/root-6.40.02-build” “C:/Root/root-6.40.02-source”

```

---

<div class="post-metadata">

**Author:** ![johanr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/johanr/32/39968_2.png) [@johanr](https://root-forum.cern.ch/u/johanr)\
**Post date:** [July 23, 2026, 7:41am UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/14 "2026-07-23T07:41:52Z")

</div>

I tried this. Now I get the error

> -- Building Cling as part of ROOT  
> – Cling version (from VERSION file): ROOT\_1.4~dev  
> – Distributed RDataFrame enabled  
> CMake Error at CMakeLists.txt:607 (if):  
> if given arguments:
> 
> “(” “var” “MATCHES” “\_(LIBRARIES|LIBRARY|INCLUDE|VERSION)” “)” “AND” “(” “NOT” “C:/Root/root-6.40.02-source/interpreter/llvm-project/clang/include” “C:/Root/root-6.40.02-build/interpreter/llvm-project/llvm/tools/clang//include” “STREQUAL” “” “)” “AND” “(” “NOT” “CLANG\_INCLUDE\_DIRS” “MATCHES” “NOTFOUND” “)”
> 
> Unknown arguments specified

I have attached the build log.

[build-log-3.txt](https://root-forum.cern.ch/uploads/short-url/w1QtqxrldkBDiw4Djpkf4GkrrNA.txt) (7.8 KB)

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [July 23, 2026, 7:50am UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/15 "2026-07-23T07:50:46Z")

</div>

Did you start with a fresh build?  
Which version of CMake are you using?

---

<div class="post-metadata">

**Author:** ![johanr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/johanr/32/39968_2.png) [@johanr](https://root-forum.cern.ch/u/johanr)\
**Post date:** [July 23, 2026, 9:13am UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/16 "2026-07-23T09:13:13Z")

</div>

I may have forgotten to do a clean build.  
I use CMake version 4.4.0

When I ran the command again I got the error message

> CMake Error at C:/Program Files/CMake/share/cmake-4.4/Modules/FindPackageHandleStandardArgs.cmake:290 (message):  
> Could NOT find Python3 (missing: Python3\_EXECUTABLE Interpreter) (Required  
> is at least version “3.0”)

So I added

> -DPython3\_EXECUTABLE=C:\Users\johan\miniconda3\python.exe

to the command:

> cmake -G"Visual Studio 17 2022" -A x64 -Thost=x64 -Dbuiltin\_freetype=ON -Dbuiltin\_ftgl=ON -Dbuiltin\_gif=ON -Dbuiltin\_gl2ps=ON -Dbuiltin\_jpeg=ON -Dbuiltin\_png=ON -Dbuiltin\_gtest=ON -Dbuiltin\_lzma=ON -Dbuiltin\_lz4=ON -Dbuiltin\_pcre=ON -Dbuiltin\_tiff=ON -Dbuiltin\_unuran=ON -Dbuiltin\_xxhash=ON -Dbuiltin\_zlib=ON -Dbuiltin\_zstd=ON -DPython3\_EXECUTABLE=C:\Users\johan\miniconda3\python.exe -DCMAKE\_INSTALL\_PREFIX=C:/Root/root-6.40.02-install -B C:/Root/root-6.40.02-build C:/Root/root-6.40.02-source

I’m using Python 3.11. Now I got the error message

> CMake Error at CMakeLists.txt:607 (if):  
> if given arguments:
> 
> “(” “var” “MATCHES” “\_(LIBRARIES|LIBRARY|INCLUDE|VERSION)” “)” “AND” “(” “NOT” “C:/Root/root-6.40.02-source/interpreter/llvm-project/clang/include” “C:/Root/root-6.40.02-build/interpreter/llvm-project/llvm/tools/clang//include” “STREQUAL” “” “)” “AND” “(” “NOT” “CLANG\_INCLUDE\_DIRS” “MATCHES” “NOTFOUND” “)”
> 
> Unknown arguments specified

I have attached the build logs

[build-log-4.txt](https://root-forum.cern.ch/uploads/short-url/9jvBHGWBaSTcgBQJEQL9jxJasgQ.txt) (8.4 KB)

[build-log-5.txt](https://root-forum.cern.ch/uploads/short-url/cm9S3yVwzP9mF7ig6XxDeXQkYO6.txt) (12.3 KB)

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [July 23, 2026, 11:34am UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/17 "2026-07-23T11:34:20Z")

</div>

Never seen such errors…  
Where do you start from? If it’s not already the case, can you start from a clean `Developer Command Prompt for VS 2022`?

---

<div class="post-metadata">

**Author:** ![johanr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/johanr/32/39968_2.png) [@johanr](https://root-forum.cern.ch/u/johanr)\
**Post date:** [July 23, 2026, 12:05pm UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/18 "2026-07-23T12:05:49Z")

</div>

I have started from a clean Windows Command Prompt. So now I tried with a clean Developer Command Prompt for VS 2022 instead. I got the same error; see the attached build log.

[build-log-6.txt](https://root-forum.cern.ch/uploads/short-url/ziyPwVpI9BAZ6bgSCo5nBpvn4As.txt) (12.5 KB)

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [July 23, 2026, 12:21pm UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/19 "2026-07-23T12:21:23Z")

</div>

So I did exactly what you’ve done, the only difference is that I have Python installed on my system in `C:\Python314`, and `C:\Python314\Scripts\;C:\Python314\` are in the `PATH`. See the output log:  
[configure-log.txt](https://root-forum.cern.ch/uploads/short-url/rTZt3O9HMY39hJMCT6W8qu3BnUl.txt) (13.3 KB)  
And BTW, if you want to use the notebook, you’ll need to `pip install notebook`

---

<div class="post-metadata">

**Author:** ![johanr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/johanr/32/39968_2.png) [@johanr](https://root-forum.cern.ch/u/johanr)\
**Post date:** [July 23, 2026, 12:22pm UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/20 "2026-07-23T12:22:49Z")

</div>

I ran CMake again with --trace. That told me that the error is in C:\Root\root-6.40.02-source\CMakeLists.txt line 607. Then I asked Gemini if the code block is correct. Gemini told me that the code is wrong and proposed a corrected version. I tested the corrected version, with Python in C:/Users/johan/miniconda3, and now it seems to work. I have attached Gemini’s answer.

[Gemini\_answer.txt](https://root-forum.cern.ch/uploads/short-url/xaOmDJtGcGAMYWzwA52MPCZStb3.txt) (2.7 KB)

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [July 23, 2026, 12:26pm UTC](https://root-forum.cern.ch/t/cern-root-on-windows/64947/21 "2026-07-23T12:26:22Z")

</div>

OK, that’s weird… Anyway, if it works for you, then just go on, I’ll try to understand the error and the Gemini answer

[Next page](https://root-forum.cern.ch/t/cern-root-on-windows/64947.md?page=2)
