# Windows10 ImportError: Failed to import libcppyy3\_7. Please check that ROOT has been built for Python 3.7

**URL:** <https://root-forum.cern.ch/t/windows10-importerror-failed-to-import-libcppyy3-7-please-check-that-root-has-been-built-for-python-3-7/44618>\
**Category:** Newbie\
**Tags:** windows\
**Created:** [April 28, 2021, 2:58am UTC](https://root-forum.cern.ch/t/windows10-importerror-failed-to-import-libcppyy3-7-please-check-that-root-has-been-built-for-python-3-7/44618 "2021-04-28T02:58:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kittyk123](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kittyk123/32/25724_2.png) [@Kittyk123](https://root-forum.cern.ch/u/Kittyk123)\
**Post date:** [April 28, 2021, 2:58am UTC](https://root-forum.cern.ch/t/windows10-importerror-failed-to-import-libcppyy3-7-please-check-that-root-has-been-built-for-python-3-7/44618/1 "2021-04-28T02:58:53Z")

</div>

I have ROOT 6.24.00 installed on Windows 10 through Anaconda3 complied against VS2019 and python 3.7.9. I get the above error

ImportError: Failed to import libcppyy3\_7. Please check that ROOT has been built for Python 3.7

when I try and import ROOT in Spyder5. I can’t call root from the anaconda prompt at all. I can check

root-config --python-version

from the anaconda prompt and it says 3.7.9. Anyone have any thoughts? I’m stumped.

---

<div class="post-metadata">

**Author:** ![jalopezg](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jalopezg/32/25844_2.png) [@jalopezg](https://root-forum.cern.ch/u/jalopezg)\
**Post date:** [April 28, 2021, 9:07am UTC](https://root-forum.cern.ch/t/windows10-importerror-failed-to-import-libcppyy3-7-please-check-that-root-has-been-built-for-python-3-7/44618/2 "2021-04-28T09:07:59Z")

</div>

Hi @Kittyk123,

I can only suspect that either `libcppyy3_7.dll` or `libcppyy_backend3_7.dll` cannot be found in the library search path. However, I am sure that @etejedor can provide a more detailed answer.

Cheers,  
J.

---

<div class="post-metadata">

**Author:** ![etejedor](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/e79b87/32.png) [@etejedor](https://root-forum.cern.ch/u/etejedor)\
**Post date:** [April 28, 2021, 10:58am UTC](https://root-forum.cern.ch/t/windows10-importerror-failed-to-import-libcppyy3-7-please-check-that-root-has-been-built-for-python-3-7/44618/3 "2021-04-28T10:58:21Z")

</div>

Hi,

That should not happen when installing via conda, I’ll check with the package maintainer and get back to you.

---

<div class="post-metadata">

**Author:** ![etejedor](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/e79b87/32.png) [@etejedor](https://root-forum.cern.ch/u/etejedor)\
**Post date:** [April 28, 2021, 11:04am UTC](https://root-forum.cern.ch/t/windows10-importerror-failed-to-import-libcppyy3-7-please-check-that-root-has-been-built-for-python-3-7/44618/4 "2021-04-28T11:04:13Z")

</div>

The ROOT conda package maintainer informed me that there are no Windows binaries for ROOT in conda-forge as 32-bit Python isn’t supported.

Is it possible that you are using a ROOT installation that you built yourself?

---

<div class="post-metadata">

**Author:** ![Kittyk123](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kittyk123/32/25724_2.png) [@Kittyk123](https://root-forum.cern.ch/u/Kittyk123)\
**Post date:** [April 28, 2021, 4:53pm UTC](https://root-forum.cern.ch/t/windows10-importerror-failed-to-import-libcppyy3-7-please-check-that-root-has-been-built-for-python-3-7/44618/5 "2021-04-28T16:53:38Z")

</div>

Yeah, I built root myself following the Github instructions to make sure it was complied against the right Visual Studio (I have 3 versions on my computer) and my version of Python. I question if the problem is my Anaconda installation since I have had previous issues calling Python from MATLAB and vice versa, but I worry about changing my Anaconda installation because I have projects for another lab I work in on my computer as well.

---

<div class="post-metadata">

**Author:** ![jalopezg](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jalopezg/32/25844_2.png) [@jalopezg](https://root-forum.cern.ch/u/jalopezg)\
**Post date:** [April 28, 2021, 7:05pm UTC](https://root-forum.cern.ch/t/windows10-importerror-failed-to-import-libcppyy3-7-please-check-that-root-has-been-built-for-python-3-7/44618/6 "2021-04-28T19:05:35Z")

</div>

Hi @Kittyk123,

If you built root yourself, some environment variables might not have the correct value (namely search paths). Try running the `thisroot.bat` script included on your build/install directory on a `cmd.exe` session. Reuse the same `cmd.exe` session to start the `python` interpreter and issue:

```python
import ROOT

```

Let us know if that workarounds your problem.

Cheers,  
J.
