# Unable to import ROOT in Python, getting a long error when trying to open ROOT in terminal (macOS Ventura 13.5.2)

**URL:** <https://root-forum.cern.ch/t/unable-to-import-root-in-python-getting-a-long-error-when-trying-to-open-root-in-terminal-macos-ventura-13-5-2/57404>\
**Category:** Newbie\
**Tags:** python, root\
**Created:** [December 5, 2023, 5:12pm UTC](https://root-forum.cern.ch/t/unable-to-import-root-in-python-getting-a-long-error-when-trying-to-open-root-in-terminal-macos-ventura-13-5-2/57404 "2023-12-05T17:12:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![madisd](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/madisd/32/34884_2.png) [@madisd](https://root-forum.cern.ch/u/madisd)\
**Post date:** [December 5, 2023, 5:12pm UTC](https://root-forum.cern.ch/t/unable-to-import-root-in-python-getting-a-long-error-when-trying-to-open-root-in-terminal-macos-ventura-13-5-2/57404/1 "2023-12-05T17:12:54Z")

</div>

Hello! After trying to uninstall and reinstall ROOT using Brew, and upgrading Brew and trying to uninstall/reinstall ROOT again, upon starting ROOT in my terminal or checking the version using `root --version`, I get the following error:

ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!  
Invoking:  
LC\_ALL=C clang++ -xc++ -E -v /dev/null 2\>&1 | sed -n -e ‘/^.include/,${’ -e ‘/^ /.\*++/p’ -e ‘}’  
Results was:  
With exit code 0

ROOT is still able to start up after this error is shown, however when I try to `import ROOT` in Python3, I get the error  
ModuleNotFoundError: No module named ‘ROOT’

I suspect these two issues are tied, but I can’t figure out how to fix them, does anyone know what might be the cause?

* * *

\_ROOT Version: 6.30/02  
\_Platform: macOS Ventura 13.5.2  
\_Compiler: Brew

* * *

---

<div class="post-metadata">

**Author:** ![mdessole](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mdessole/32/34021_2.png) [@mdessole](https://root-forum.cern.ch/u/mdessole)\
**Post date:** [December 6, 2023, 8:37am UTC](https://root-forum.cern.ch/t/unable-to-import-root-in-python-getting-a-long-error-when-trying-to-open-root-in-terminal-macos-ventura-13-5-2/57404/2 "2023-12-06T08:37:13Z")

</div>

Hi @madisd,  
thanks for reaching out!

So, after a quick search on the forum, it lokks like your issue is not new. [Here]{[Problem running root on macOS 10.13.6: ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!](https://root-forum.cern.ch/t/problem-running-root-on-macos-10-13-6-error-in-cling-createci-cannot-extract-standard-library-include-paths/30139)} the problem was solve by reinstalling ROOT from source instead of using brew.

BTW, can you tell what’s the output of `clang++ -xc++ -E -v /dev/null 2>&1 | sed -n -e ‘/^.include/,${’ -e ‘/^ /.*++/p’ -e ‘}’`?

Cheers,  
Monica
