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

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.

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:

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

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 .

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:

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

Please let us know if this works for you.

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.


test.inp (156 Bytes)

How do I fix it?

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.

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

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

Providing this information is essential for effectively troubleshooting