# Windows 10 cmd/VSCode: "Failed to import libcppyy3\_8" and "No module named 'ROOT"

**URL:** <https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399>\
**Category:** ROOT\
**Tags:** windows, python, root, jupyter\
**Created:** [June 14, 2022, 2:37pm UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399 "2022-06-14T14:37:30Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ovs](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ovs/32/30001_2.png) [@ovs](https://root-forum.cern.ch/u/ovs)\
**Post date:** [June 14, 2022, 2:37pm UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/1 "2022-06-14T14:37:31Z")

</div>

* * *

_ROOT Version:_ 6.26/02  
_Platform:_ Windows 10  
_Python version_: 3.8.10 (changed to this for compatibility with ROOT python version below)  
_ROOT python version_: 3.8.10

_Problem:_ **import ROOT** in cmd and VSCode

* * *

Hello!

The command “import ROOT” provides two problems in my system.

1. Opening python in cmd, running “set PYTHONPATH=C:…\root\bin” and using command “import ROOT” results in **ImportError: Failed to import libcppyy3\_8. Please check that ROOT has been built for Python 3.8** (this is the last line of the error message).
2. Running a file with “import ROOT” in VSCode, in a Jupyter Notebook results in **ModuleNotFoundError: No module named ROOT**.

I would like to fix these problems. Could you point me to something?

Best regards,  
ovs

EDIT:  
ROOT and python both have 32-bit architecture, and the usual “thisroot.bat” -script has been used.

---

<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:** [June 14, 2022, 2:40pm UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/2 "2022-06-14T14:40:30Z")

</div>

Welcome to the ROOT Forum!  
Please make sure you have the same architecture (32 bit vs 64 bit) for both Python and ROOT and use the `root\bin\thisroot.bat` script

---

<div class="post-metadata">

**Author:** ![ovs](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ovs/32/30001_2.png) [@ovs](https://root-forum.cern.ch/u/ovs)\
**Post date:** [June 14, 2022, 2:43pm UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/3 "2022-06-14T14:43:04Z")

</div>

Hello and thanks for the warm welcome!

Good that you mentioned, I should add that I have done both of the procedures you mentioned.

---

<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:** [June 14, 2022, 2:47pm UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/4 "2022-06-14T14:47:42Z")

</div>

> [@ovs](#):
>
> Good that you mentioned, I should add that I have done both of the procedures you mentioned.

Then it should work, at least from the command prompt. And BTW,

> [@ovs](#):
>
> running “set PYTHONPATH=C:…\root\bin”

Please don’t do this. This is not needed if you called `thisroot.bat` before starting Python.  
One more thing: Can you paste the output of `root-config --python-version`?

---

<div class="post-metadata">

**Author:** ![ovs](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ovs/32/30001_2.png) [@ovs](https://root-forum.cern.ch/u/ovs)\
**Post date:** [June 14, 2022, 3:01pm UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/5 "2022-06-14T15:01:16Z")

</div>

Thanks for the help. However, even after this the cmd does not work, and inputs the same error.

The output of `root-config --python-version` is given below.

```auto
ROOT ./configure options:
CMAKE_CXX_STANDARD_LIBRARIES=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib 
CMAKE_C_STANDARD_LIBRARIES=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib FFTW_INCLUDE_DIR=C:/libs/fftw/3.3.5 
FFTW_LIBRARY=C:/libs/fftw/3.3.5/fftw3-3.lib 
GLEW_INCLUDE_DIR=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/glew/inc 
GLEW_INCLUDE_DIRS=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/glew/inc GLEW_LIBRARIES=GLEW::GLEW 
GLEW_LIBRARY=$<TARGET_FILE:GLEW> 
LZ4_INCLUDE_DIR=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/lz4 
LZ4_INCLUDE_DIRS=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/lz4 
LZ4_LIBRARIES=LZ4::LZ4 LZ4_LIBRARY=$<TARGET_FILE:lz4> LZ4_VERSION=1.9.3 
LZ4_VERSION_STRING=1.9.3 NUMPY_INCLUDE_DIRS=C:/Python38/Lib/site-packages/numpy/core/include OPENGL_gl_LIBRARY=opengl32 OPENGL_glu_LIBRARY=glu32 
PCRE_INCLUDE_DIR=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/build/builtins/pcre/PCRE-prefix/src/PCRE-build 
PCRE_LIBRARIES=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/build/builtins/pcre/PCRE-prefix/src/PCRE-build/Release/pcre.lib 
PCRE_PCRE_LIBRARY=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/build/builtins/pcre/PCRE-prefix/src/PCRE-build/Release/pcre.lib PCRE_VERSION=8.43 
PYTHON_INCLUDE_DIRS=C:/Python38/include PYTHON_LIBRARIES=C:/Python38/libs/python38.lib
PYTHON_LIBRARY_DIR=C:/Python38/libs PYTHON_VERSION_MAJOR=3 
PYTHON_VERSION_MINOR=8 PYTHON_VERSION_STRING=3.8.10 
ZLIB_INCLUDE_DIR=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/zlib 
ZLIB_INCLUDE_DIRS=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/zlib 
ZLIB_LIBRARIES=ZLIB::ZLIB ZLIB_LIBRARY=$<TARGET_FILE:ZLIB> ZLIB_VERSION=1.2.8 
ZLIB_VERSION_STRING=1.2.8 
ZSTD_INCLUDE_DIR=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/zstd 
ZSTD_INCLUDE_DIRS=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/zstd 
ZSTD_LIBRARIES=ZSTD::ZSTD ZSTD_LIBRARY=$<TARGET_FILE:ZSTD> ZSTD_VERSION=1.4.8 
ZSTD_VERSION_STRING=1.4.8 
xxHash_INCLUDE_DIR=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/xxhash 
xxHash_INCLUDE_DIRS=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/xxhash xxHash_LIBRARIES=xxHash::xxHash xxHash_LIBRARY=$<TARGET_FILE:xxhash> xxHash_VERSION=0.8.0 xxHash_VERSION_STRING=0.8.0

```

---

<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:** [June 14, 2022, 3:03pm UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/6 "2022-06-14T15:03:35Z")

</div>

> [@ovs](#):
>
> The output of `root-config --python-version` is given below.

I don’t think so. Open a command prompt, call `thisroot.bat` and type `root-config --python-version`. It should give something like this:

```auto
C:\Users\bellenot>root-config --python-version
 3.9.6

C:\Users\bellenot>

```

---

<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:** [June 14, 2022, 3:06pm UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/7 "2022-06-14T15:06:01Z")

</div>

Here is what I do:

```auto
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.11.15
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86'

C:\Users\bellenot>build\x86\release\bin\thisroot.bat

C:\Users\bellenot>root-config --python-version
 3.9.6

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
>>>

```

Can you show me (copy and paste) the same procedure?

---

<div class="post-metadata">

**Author:** ![ovs](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ovs/32/30001_2.png) [@ovs](https://root-forum.cern.ch/u/ovs)\
**Post date:** [June 14, 2022, 3:14pm UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/8 "2022-06-14T15:14:19Z")

</div>

Here is the copy-pasted code from cmd. I actually need to use the command `root -config --python-version`, with one space after “root”, otherwise the command is not recognized.

```auto
C:\root\bin>thisroot.bat

C:\root\bin>root -config --python-version
ROOT ./configure options:
CMAKE_CXX_STANDARD_LIBRARIES=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib CMAKE_C_STANDARD_LIBRARIES=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib FFTW_INCLUDE_DIR=C:/libs/fftw/3.3.5 FFTW_LIBRARY=C:/libs/fftw/3.3.5/fftw3-3.lib GLEW_INCLUDE_DIR=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/glew/inc GLEW_INCLUDE_DIRS=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/glew/inc GLEW_LIBRARIES=GLEW::GLEW GLEW_LIBRARY=$<TARGET_FILE:GLEW> LZ4_INCLUDE_DIR=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/lz4 LZ4_INCLUDE_DIRS=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/lz4 LZ4_LIBRARIES=LZ4::LZ4 LZ4_LIBRARY=$<TARGET_FILE:lz4> LZ4_VERSION=1.9.3 LZ4_VERSION_STRING=1.9.3 NUMPY_INCLUDE_DIRS=C:/Python38/Lib/site-packages/numpy/core/include OPENGL_gl_LIBRARY=opengl32 OPENGL_glu_LIBRARY=glu32 PCRE_INCLUDE_DIR=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/build/builtins/pcre/PCRE-prefix/src/PCRE-build PCRE_LIBRARIES=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/build/builtins/pcre/PCRE-prefix/src/PCRE-build/Release/pcre.lib PCRE_PCRE_LIBRARY=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/build/builtins/pcre/PCRE-prefix/src/PCRE-build/Release/pcre.lib PCRE_VERSION=8.43 PYTHON_INCLUDE_DIRS=C:/Python38/include PYTHON_LIBRARIES=C:/Python38/libs/python38.lib PYTHON_LIBRARY_DIR=C:/Python38/libs PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 PYTHON_VERSION_STRING=3.8.10 ZLIB_INCLUDE_DIR=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/zlib ZLIB_INCLUDE_DIRS=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/zlib ZLIB_LIBRARIES=ZLIB::ZLIB ZLIB_LIBRARY=$<TARGET_FILE:ZLIB> ZLIB_VERSION=1.2.8 ZLIB_VERSION_STRING=1.2.8 ZSTD_INCLUDE_DIR=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/zstd ZSTD_INCLUDE_DIRS=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/zstd ZSTD_LIBRARIES=ZSTD::ZSTD ZSTD_LIBRARY=$<TARGET_FILE:ZSTD> ZSTD_VERSION=1.4.8 ZSTD_VERSION_STRING=1.4.8 xxHash_INCLUDE_DIR=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/xxhash xxHash_INCLUDE_DIRS=C:/build/ws/BUILDTYPE/Release/LABEL/windows64/V/6-26/root/builtins/xxhash xxHash_LIBRARIES=xxHash::xxHash xxHash_LIBRARY=$<TARGET_FILE:xxhash> xxHash_VERSION=0.8.0 xxHash_VERSION_STRING=0.8.0

C:\root\bin>python
Python 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:34:34) [MSC v.1928 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:\Users\onnis\AppData\Local\Programs\Python\Python38-32\lib\importlib\ __init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 657, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 556, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1166, in create_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: DLL load failed while importing libcppyy3_8: %1 ei ole kelvollinen Win32-sovellus.

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_8. Please check that ROOT has been built for Python 3.8
>>>

```

---

<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:** [June 14, 2022, 3:21pm UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/9 "2022-06-14T15:21:26Z")

</div>

OK, That’s weird. I’ll try to reproduce the problem and come back to you

---

<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:** [June 15, 2022, 6:59am UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/10 "2022-06-15T06:59:48Z")

</div>

So I only manage to reproduce the issue when using a newest version of Python (e.g. 3.9.6). I tried ROOT v6.26.02 with Python 3.8.3 and it works just fine:

```auto
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.11.15
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86'

C:\Users\sftnight>Downloads\root\bin\thisroot.bat

C:\Users\sftnight>python
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
>>> quit()

C:\Users\sftnight>

```

---

<div class="post-metadata">

**Author:** ![ovs](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ovs/32/30001_2.png) [@ovs](https://root-forum.cern.ch/u/ovs)\
**Post date:** [June 15, 2022, 10:27am UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/11 "2022-06-15T10:27:03Z")

</div>

Hello!

Python 3.8.3 produces the same error, and `root -config --python-version` still outputs the same long message, so no progress here.

Thanks for your help, still!

---

<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:** [June 15, 2022, 10:33am UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/12 "2022-06-15T10:33:47Z")

</div>

Forget about `root -config --python-version`, this is useless, the `root-config.bat` script is missing (I’ll fix this). And you downloaded `root_v6.26.02.win32.vc16.zip`, right?

---

<div class="post-metadata">

**Author:** ![ovs](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ovs/32/30001_2.png) [@ovs](https://root-forum.cern.ch/u/ovs)\
**Post date:** [June 15, 2022, 10:41am UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/13 "2022-06-15T10:41:26Z")

</div>

I actually downloaded the `root_v6.26.02.win64.vc17`. I’ll try the one you mentioned.

---

<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:** [June 15, 2022, 10:45am UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/14 "2022-06-15T10:45:28Z")

</div>

You told me you installed ROOT 32 bit (see the first question I asked). `root_v6.26.02.win64.vc17` is 64 bit (see the `win64` in the name?), so I think we found the issue… 😉

---

<div class="post-metadata">

**Author:** ![ovs](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ovs/32/30001_2.png) [@ovs](https://root-forum.cern.ch/u/ovs)\
**Post date:** [June 16, 2022, 8:07am UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/15 "2022-06-16T08:07:05Z")

</div>

Hello!

It would seem that now the cmd-side is OK. The VSCode still has the same problem, but I’ll try to sort it out in due time. A huge thanks for the patience and help! 🙂

---

<div class="post-metadata">

**Author:** ![ovs](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ovs/32/30001_2.png) [@ovs](https://root-forum.cern.ch/u/ovs)\
**Post date:** [June 16, 2022, 10:11am UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/16 "2022-06-16T10:11:42Z")

</div>

Say, would you know anything about the Jupyter Notebook? The following snippet at least starts to execute, however it kills the kernel:

`import sys`  
`sys.path.append("C:/root/bin/")`  
`import ROOT`

The errors given in the output are (essentially):

`C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h:205:12: error: redefinition of '_CrtEnableIf<true, _Ty>'`  
`C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h:596:16: error: redefinition of '__crt_locale_data_public'`  
`C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h:603:16: error: redefinition of '__crt_locale_pointers'`  
`C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h:611:16: error: redefinition of '_Mbstatet'`

`Canceled future for execute_request message before replies were done`

---

<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:** [June 17, 2022, 6:25am UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/17 "2022-06-17T06:25:05Z")

</div>

Can you fully describe what you did? How do you start your notebook? Did you try `root --notebook`?

---

<div class="post-metadata">

**Author:** ![ovs](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ovs/32/30001_2.png) [@ovs](https://root-forum.cern.ch/u/ovs)\
**Post date:** [June 17, 2022, 8:13am UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/18 "2022-06-17T08:13:37Z")

</div>

Hello!

I created a .ipynb file in VSCode, and ran the code I mentioned.  
Running `root --notebook` in the VSCode terminal (and other terminals) gives an error

`Jupyter command `jupyter-notebook` not found.`

I have installed jupyter and metakernel, so the problem could be in the terminal not finding the jupyter installation.

As a side question, if I want to use a .ipynb file “locally” in VSCode, is the `root --notebook` command required? I must admit my understanding about the jupyter ecosystem is not too extensive.

---

<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:** [June 17, 2022, 8:17am UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/19 "2022-06-17T08:17:22Z")

</div>

Sorry, but the only way I know is to use Jupyter notebook via `root --notebook` on the command prompt. I have no experience with the way you are trying to use it in VS Code.

---

<div class="post-metadata">

**Author:** ![ovs](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ovs/32/30001_2.png) [@ovs](https://root-forum.cern.ch/u/ovs)\
**Post date:** [June 17, 2022, 8:20am UTC](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399/20 "2022-06-17T08:20:17Z")

</div>

Where do you edit your code? My idea is to use VSCode to open a file, and write code to it.

[Next page](https://root-forum.cern.ch/t/windows-10-cmd-vscode-failed-to-import-libcppyy3-8-and-no-module-named-root/50399.md?page=2)
