I have a series of scripts, which include some computations with the pyfmi module. When I run the main function in my python environment (Spyder), I do not have any errors - the pyfmi computations run perfectly. But, when I package the whole thing using pyInstaller to make an executable, the pyfmi module causes issues.
I am able to run my GUI using the exe file. But whenever I click the button that calls the pyfmi library, I get an error on the console saying that 'No module named pyfmi.common.core'. I tried different import options such as import pyfmi
, from pyfmi import *
, from pyfmi import fmu_util
etc., but it doesn't resolve the issue.
Try running the following script in order to generate your executeable:
This worked for me in a file which uses
If there are further modules missing, just add them the way it is shown here.