Entry point error when running Geant4 with Python


I have Geant4 working good on Windows 10. I built G4 with both OpenGLWin32 and QT. I am able to use both visualizations without any problems.

I am using a modified version of exampleB1 for physics simulations. When I run this modified version by just “clicking” on the executable, it works good. When I run my exampleB1 with a macro file in the command prompt, it works good.

My problem is that when I try and run my exampleB1 (alongside a macro file) via a Python script (I use the subprocess.run() function), it gives me a bunch of Entry point errors, all related to Qt “stuff” not being in some of the Geant4 Dynamic Link Libraries.

The weird thing is that this exact Python script worked perfectly when I had previously built Geant4 with OpenGLWin32 only, and not with Qt.

I have tried to set my G4UI_USE_WIN32 environment variable to “1”, so that it is forced to use OpenGlWin32, but have had no luck with getting the Python script working.

Any help is greatly appreciated!