# Problem "dynamic module does not define module export function" (Mac M1 14.4)

**URL:** <https://fluka-forum.web.cern.ch/t/problem-dynamic-module-does-not-define-module-export-function-mac-m1-14-4/7022>\
**Category:** Flair\
**Created:** [12 February 2025 09:53 UTC](https://fluka-forum.web.cern.ch/t/problem-dynamic-module-does-not-define-module-export-function-mac-m1-14-4/7022 "2025-02-12T09:53:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![a.zanelli4](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@a.zanelli4](https://fluka-forum.web.cern.ch/u/a.zanelli4)\
**Post date:** [12 February 2025 09:53 UTC](https://fluka-forum.web.cern.ch/t/problem-dynamic-module-does-not-define-module-export-function-mac-m1-14-4/7022/1 "2025-02-12T09:53:14Z")

</div>

Hi, I’m new to Flair and having issues. I installed Flair and Geoviewer, but when I launch Flair, the interface opens but then doesn’t work properly (I can click, but the interfaces start overlapping, and I can’t perform any actions). In the terminal, I get this error:

> w\> Warning: Geometry Viewer not found  
> e\> ERROR: dynamic module does not define module export function (PyInit\_geoviewer)

How can I fix this? I’ve tried the solutions suggested in other posts on this forum, but they didn’t work.

---

<div class="post-metadata">

**Author:** ![luillo](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/l/4bbf92/32.png) [@luillo](https://fluka-forum.web.cern.ch/u/luillo)\
**Post date:** [12 February 2025 11:32 UTC](https://fluka-forum.web.cern.ch/t/problem-dynamic-module-does-not-define-module-export-function-mac-m1-14-4/7022/3 "2025-02-12T11:32:53Z")

</div>

Hello @a.zanelli4 ,

It appears that the `geoviewer.so` library may not have been created or copied in the flair directory.  
A recent post discussed this issue:

> [@Geometry Viewer not found (Mac M1 MacOS 14.1.1)](https://fluka-forum.web.cern.ch/t/geometry-viewer-not-found-mac-m1-macos-14-1-1/6966):
>
> Hello, i’m new to Flair and trying to download it to my MacBook, however, i realize i had an issue with the download that the geometry part as it doesn’t work in the software, and i had fellow all the instructions for compile flair-geoviewer on the website. hoping someone can help me with this, thanks

Please review the post and let us know if it resolves the problem.

---

<div class="post-metadata">

**Author:** ![a.zanelli4](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@a.zanelli4](https://fluka-forum.web.cern.ch/u/a.zanelli4)\
**Post date:** [12 February 2025 12:28 UTC](https://fluka-forum.web.cern.ch/t/problem-dynamic-module-does-not-define-module-export-function-mac-m1-14-4/7022/4 "2025-02-12T12:28:23Z")

</div>

I checked, and geoviewer.so is present in the Flair folder:  
`/Users/albertozanelli/FLUKA/flair-3.3/geoviewer.so`

As mentioned in that post, I already tried running `sudo port install tk +x11`, uninstalling geoviewer, and reinstalling it, but the issue persists.

Additionally, I am using Python 3.9, which should not cause any problems.

I am also attaching the results of `echo $PATH` and `port select --summary` .

 ![Screenshot 2025-02-12 alle 13.26.24](https://fluka-forum.web.cern.ch/uploads/default/original/2X/2/2a4e3236342b34db43c8ee682f59239f73d7ecd5.png)

---

<div class="post-metadata">

**Author:** ![luillo](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/l/4bbf92/32.png) [@luillo](https://fluka-forum.web.cern.ch/u/luillo)\
**Post date:** [12 February 2025 15:29 UTC](https://fluka-forum.web.cern.ch/t/problem-dynamic-module-does-not-define-module-export-function-mac-m1-14-4/7022/5 "2025-02-12T15:29:45Z")

</div>

Dear @a.zanelli4 ,

I noticed from your snapshot (second column in the table) that you’re actually using Python 3.12. This shouldn’t be a problem, as we have a solution that should work with all Python versions:

> [@Flair on macOS Sequoia 15.2](https://fluka-forum.web.cern.ch/t/flair-on-macos-sequoia-15-2/6925/9):
>
> Hello @mchin , After contacting MacPorts support, we have a solution for Python 3.13 (or Python3.12 as well for you). You can test it with the following instructions: sudo port install tk +x11 # not needed in your case Then rebuild py313-tkinter from source sudo port -ns upgrade --force py313-tkinter Or, if you haven’t installed the port yet, use: sudo port -ns install py313-tkinter Before testing, remember to select the proper Python version slight_smile sudo port select --set python…

I think that your problem is related to the mixed environment HomeBrew/MacPorts. The recommended approach is to avoid mixing Homebrew and MacPorts, as this often leads to conflicts. I would suggest cleaning your environment settings as in this post

> [@SIGBUS error on first run](https://fluka-forum.web.cern.ch/t/sigbus-error-on-first-run/6601/7):
>
> Hello @mrivers , I see that you have a mixed environment HomeBrew/MacPorts: this is not a good approach as libraries can be mixed and generate conflicts. For the installation of FLUKA/Flair, it is recommended to use MacPorts (at the moment we have no working solution with HomeBrew). Therefore, my recommendation is to use reinstall FLUKA in a Terminal where only MacPorts environments is defined. To do this, follow these steps: Define environment switching functions in your shell startup fil…

Please let us know if this works for you.

---

<div class="post-metadata">

**Author:** ![a.zanelli4](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@a.zanelli4](https://fluka-forum.web.cern.ch/u/a.zanelli4)\
**Post date:** [14 February 2025 09:34 UTC](https://fluka-forum.web.cern.ch/t/problem-dynamic-module-does-not-define-module-export-function-mac-m1-14-4/7022/6 "2025-02-14T09:34:45Z")

</div>

I have uninstalled everything related to Macports and FLUKA, updated to macOS Sequoia 15.3, and am reinstalling everything from scratch. I have created an environment for MacPorts in the shell startup file and uninstalled any installed version of Python. It was necessary to install gcc13, and during the FLUKA installation, the command `make install DESTDIR=/usr/local/fluka` did not work (error: `make: *** No rule to make target 'install'. Stop.` ). So, I just ran `make` , but I don’t think it’s a problem.

Then, I tried to compile a simple program with FLUKA, but I get the errors shown in the image. I’ll upload the program I compiled.

 ![Screenshot 2025-02-14 alle 10.21.59](https://fluka-forum.web.cern.ch/uploads/default/original/2X/7/741cc02367de5b5e39011076c2473f55dffd1834.png)  
[test.inp](https://fluka-forum.web.cern.ch/uploads/short-url/zezblgfZbbGVro6Dd3JenIT1qLz.inp) (156 Bytes)

How do I fix it?

---

<div class="post-metadata">

**Author:** ![luillo](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/l/4bbf92/32.png) [@luillo](https://fluka-forum.web.cern.ch/u/luillo)\
**Post date:** [14 February 2025 10:28 UTC](https://fluka-forum.web.cern.ch/t/problem-dynamic-module-does-not-define-module-export-function-mac-m1-14-4/7022/7 "2025-02-14T10:28:47Z")

</div>

Dear @a.zanelli4

Your FLUKA input file is showing an error in the `GEOBEGIN` card. Are you using Flair to create/edit it?

To test your FLUKA installation, I would recommend running the example input file located at `fluka/examples/example.inp`. You can also find examples within Flair under the “Input” tab in the “New” menu. If the example runs, the problem is in your input file, not the installation.

 ![Screenshot 2025-02-14 at 11.24.46](https://fluka-forum.web.cern.ch/uploads/default/original/2X/a/aa659ba5c8810f0f84269a279edfb4d2c2296981.png)

---

<div class="post-metadata">

**Author:** ![a.zanelli4](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@a.zanelli4](https://fluka-forum.web.cern.ch/u/a.zanelli4)\
**Post date:** [14 February 2025 11:14 UTC](https://fluka-forum.web.cern.ch/t/problem-dynamic-module-does-not-define-module-export-function-mac-m1-14-4/7022/8 "2025-02-14T11:14:21Z")

</div>

Ok, I’ve tried with example.inp, but I get the same errors.

 ![Screenshot 2025-02-14 alle 12.09.00](https://fluka-forum.web.cern.ch/uploads/default/original/2X/7/7f1fbf1af90b13bb38f02a7a462b25eab2bae48f.png)

---

<div class="post-metadata">

**Author:** ![luillo](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/l/4bbf92/32.png) [@luillo](https://fluka-forum.web.cern.ch/u/luillo)\
**Post date:** [14 February 2025 13:22 UTC](https://fluka-forum.web.cern.ch/t/problem-dynamic-module-does-not-define-module-export-function-mac-m1-14-4/7022/9 "2025-02-14T13:22:56Z")

</div>

Please inspect the contents of the `*.err` , `*.out` , and `*.log` files.

Providing this information is essential for effectively troubleshooting

---

<div class="post-metadata">

**Author:** ![horvathd](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/horvathd/32/10584_2.png) [@horvathd](https://fluka-forum.web.cern.ch/u/horvathd)\
**Post date:** [4 March 2025 07:29 UTC](https://fluka-forum.web.cern.ch/t/problem-dynamic-module-does-not-define-module-export-function-mac-m1-14-4/7022/10 "2025-03-04T07:29:56Z")

</div>


