'PyInstaller executable with panda3d throws exception

I am having an issue with a program, which uses panda3d. It works perfectly when executed as a pythonscript, but the version, which is compiled (or rather packaged) by PyInstaller throws the exception below.

:display(warning): Unable to load libpandagl.so: No error.
Known pipe types:
(all display modules loaded.)
Traceback (most recent call last):
  File "Shipsim3d_1-1.py", line 930, in <module>
  File "Shipsim3d_1-1.py", line 23, in __init__
  File "direct/showbase/ShowBase.py", line 339, in __init__
  File "direct/showbase/ShowBase.py", line 1024, in openDefaultWindow
  File "direct/showbase/ShowBase.py", line 1059, in openMainWindow
  File "direct/showbase/ShowBase.py", line 769, in openWindow
  File "direct/showbase/ShowBase.py", line 749, in <lambda>
  File "direct/showbase/ShowBase.py", line 821, in _doOpenWindow
  File "direct/showbase/ShowBase.py", line 650, in makeDefaultPipe
  File "direct/directnotify/Notifier.py", line 130, in error
Exception: No graphics pipe is available!
Your Config.prc file must name at least one valid panda display
library via load-display or aux-display.
[5466] Failed to execute script 'Shipsim3d_1-1' due to unhandled exception!

The .prc file doesn't exist in the executable, but even if I copy it there manually, it still doesn't work. In my Code, I use a function called loadPrcData. Is that a Part of the problem? Or is it something else?

Thanks in advance



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source