# Failed module loading when importing ROOT as a python package

**URL:** <https://root-forum.cern.ch/t/failed-module-loading-when-importing-root-as-a-python-package/49895>\
**Category:** ROOT\
**Tags:** python\
**Created:** [May 7, 2022, 10:07am UTC](https://root-forum.cern.ch/t/failed-module-loading-when-importing-root-as-a-python-package/49895 "2022-05-07T10:07:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmanz](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/e36b37/32.png) [@dmanz](https://root-forum.cern.ch/u/dmanz)\
**Post date:** [May 7, 2022, 10:07am UTC](https://root-forum.cern.ch/t/failed-module-loading-when-importing-root-as-a-python-package/49895/1 "2022-05-07T10:07:56Z")

</div>

I am very new to ROOT. I want to import it into an anaconda environment. ROOT has already been downloaded within this environment . However, when I attempt an import I receive a “‘Darwin’ uses additional module map error”(see picture). This is followed by a series of failed loaded modules. It should be noted that I have xcode downloaded in addition to the command lines. Some(perhaps) useful specifications:

Python: 3.10.4(within anaconda)  
conda: 4.12.0  
Xcode: 13.3.1

 ![Screenshot 2022-05-07 at 11.53.33](https://root-forum.cern.ch/uploads/default/original/3X/c/c/cc4661e01074c11d9600997753ccdf615af92431.png)

\_ROOT Version: 6.26.02  
\_Platform: Mac OS Monterey 12.3.1  
_Compiler:_ Not Provided

* * *

---

<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:** [May 7, 2022, 10:29am UTC](https://root-forum.cern.ch/t/failed-module-loading-when-importing-root-as-a-python-package/49895/2 "2022-05-07T10:29:29Z")

</div>

Welcome to the ROOT Forum! If you search this forum, you will find several topics related to the same issue, and most probably find the solution to it (this is one of the purposes of the forum)  
[https://root-forum.cern.ch/search?q=Module%20Darwin%20map](https://root-forum.cern.ch/search?q=Module%20Darwin%20map)

---

<div class="post-metadata">

**Author:** ![dmanz](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/e36b37/32.png) [@dmanz](https://root-forum.cern.ch/u/dmanz)\
**Post date:** [May 7, 2022, 5:40pm UTC](https://root-forum.cern.ch/t/failed-module-loading-when-importing-root-as-a-python-package/49895/3 "2022-05-07T17:40:54Z")

</div>

Thank you! The thing is I’ve been through this entire discussion thread and tried every suggestion. I have tried various versions of Xcode, deleted and re-downloaded root and tried various versions of python. Still receiving the same error. Any further suggestions for a newbie would be highly appreciated!🙂

---

<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:** [May 7, 2022, 7:28pm UTC](https://root-forum.cern.ch/t/failed-module-loading-when-importing-root-as-a-python-package/49895/4 "2022-05-07T19:28:41Z")

</div>

Then I’ll ask a Mac user ( @couet , @Axel ) to take a look at this

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [May 9, 2022, 5:24am UTC](https://root-forum.cern.ch/t/failed-module-loading-when-importing-root-as-a-python-package/49895/5 "2022-05-09T05:24:37Z")

</div>

I can just tell what I am doing.  
I have:

- Python 3.8.9
- Xcode 13.3.1
- MacOs 12.3.1
- Install ROOT master 6.27/01
- cmake flags: `-Dhttp=ON -Droot7=ON -DCMAKE_CXX_STANDARD=17 -Dall=ON -Dbuiltin_xrootd=ON`

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [May 12, 2022, 7:21pm UTC](https://root-forum.cern.ch/t/failed-module-loading-when-importing-root-as-a-python-package/49895/6 "2022-05-12T19:21:25Z")

</div>

> [@Problem with root on macos: error: module 'Darwin' uses additional module map](https://root-forum.cern.ch/t/problem-with-root-on-macos-error-module-darwin-uses-additional-module-map/47443):
>
> Hi, I have ROOT 6.22/08, it has been working fine on macos Big Sur, now I updated to Monterey, updated Xcode, I had to install again the command line tools and now when I am running ROOT I get: Mareks-MacBook:~ marekwalczak$ root Desktop/test\_mid.root input\_line\_1:1:2: error: module 'Darwin' uses additional module map '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine.modulemap' used when the module was built #include \<new\> ^ input\_line\_1:1:2: note: imported by module 'st…

> [@APPLE updated MacOS to 12.0 SDK](https://root-forum.cern.ch/t/apple-updated-macos-to-12-0-sdk/47456):
>
> Hello APPLE has upgrade their SDKs – now at version 12.0. Root starts but emits the following messages: input\_line\_1:1:2: error: module ‘Darwin’ uses additional module map ‘/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/netinet6.modulemap’ used when the module was built #include ^ input\_line\_1:1:2: note: imported by module ‘std’ in ‘/Users/claudeapruneau/Documents/GitHub/root/root\_install/lib/std.pcm’ Warning in cling::Incre…

> [@Error: module 'Darwin' does not use additional module map WITH brew & xcode 13.0](https://root-forum.cern.ch/t/error-module-darwin-does-not-use-additional-module-map-with-brew-xcode-13-0/48621):
>
> Please read [tips for efficient and successful posting](https://root-forum.cern.ch/t/tips-for-efficient-and-successful-posting/28292) and [posting code](https://root-forum.cern.ch/t/posting-code-read-this-first/28293) ROOT Version: 6.24.06 Platform: MacOS Monterey 12.1 Compiler: Not Provided I’m trying to install ROOT with: brew install root, but failed to run. I read other post on this error, saying you could run root with xcode13.0 and command line tools 13.0. I double check with : brew config HOMEBREW\_VERSION: 3.3.13 ORIGIN: [GitHub - Homebrew/brew: beer The missing package manager for macOS (or Linux)](https://github.com/Homebrew/brew) HEAD: 2ae21a582a90571abb66b…

> [@ROOT-Build Fail on MacOS 12.1](https://root-forum.cern.ch/t/root-build-fail-on-macos-12-1/48752/2):
>
> It seems like there are other threads: and perhaps someone can advise. See I have a previous version of ROOT install and it worked on MacOS 12.1 until I updated XCode. So is there a way to just use that build if I just reverted back to the older version of XCode?

etc. @vvassilev is there a solution to this now?

---

<div class="post-metadata">

**Author:** ![vvassilev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/v/f0a364/32.png) [@vvassilev](https://root-forum.cern.ch/u/vvassilev)\
**Post date:** [May 12, 2022, 8:02pm UTC](https://root-forum.cern.ch/t/failed-module-loading-when-importing-root-as-a-python-package/49895/7 "2022-05-12T20:02:43Z")

</div>

Yes, [Fix running with macOS 12.0+ SDK after building with an older SDK by chrisburr · Pull Request #10555 · root-project/root · GitHub](https://github.com/root-project/root/pull/10555)

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [May 26, 2022, 8:03pm UTC](https://root-forum.cern.ch/t/failed-module-loading-when-importing-root-as-a-python-package/49895/8 "2022-05-26T20:03:30Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
