While converting a program created using the ursina module to exe format using pyinstaller, Exception: No graphics pipe is available! An error occurred

hello. I am a college student learning coding in Korea.
I’m not good at English, so I use a translator.

As a hobby, I am creating a 3D game program using the ursina module.

While working on code, when I create a file with code in VSC, the load function does not work because it is in an editing state. So, while testing to see if this problem also occurs when converting to exe, I convert it to exe format and run it. As in the title above, An error occurred.

Previously, I contacted the creator of ursina separately for other reasons in twitter DM, but there was no reply, so while looking at the ursina code, I found out that it uses panda3d, so I asked this question.

The overall error code is like this.

Traceback (most recent call last):
File “prototype.py”, line 15, in
File “ursina\main.py”, line 32, in init
File “direct\showbase\ShowBase.py”, line 341, in init
File “direct\showbase\ShowBase.py”, line 1026, in openDefaultWindow
File “direct\showbase\ShowBase.py”, line 1061, in openMainWindow
File “direct\showbase\ShowBase.py”, line 771, in openWindow
File “direct\showbase\ShowBase.py”, line 757, in
File “direct\showbase\ShowBase.py”, line 823, in _doOpenWindow
File “direct\showbase\ShowBase.py”, line 653, 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.

I also updated the graphics driver to the latest version, set the environment variables, and changed the values ​​in Config.prc since it was a driver that supports DirectX. I also touched the spec file and even updated pyinstaller.

graphics driver: Intel(R) Iris(R) Xe Graphics
driver’s version:
DirectX version: 12(FL 12.1)

Using OS: Window11

If necessary, I will provide you with the source code of all files I work on.

In fact, Panda3D has its own add-in for building a binary distribution.


It looks like your problem is that Config.prc was not found. It is difficult to advise anything here, since you have taken an unpopular path.

1 Like

Pyinstaller is probably not picking up the graphics backends as dependencies due to the dynamic nature in which they are loaded. This means you’ll need to copy the appropriate DLLs yourself (or see if Pyinstaller has an option to specify extra files).

Or, as mentioned, use the distribution tools that Panda ships with.

1 Like

yes, It is correct that the error code is output saying that the Config.prc file does not exist. But, so I --add-data “path/to/Config.prc;.” I added it and confirmed that it was added to ‘dist/’.

However, it is difficult to get advice, perhaps because it is an unpopular route. Still, thank you for replying like this.

I need to look for exe conversion using a method other than pyinstaller.

I’m not sure what a DLL is, but the point is that there are times when it doesn’t work due to the characteristics of Pyinstaller, and this could be a case for that.

I’m not sure what distribution tools Panda provides, but thank you for your reply.

Serega posted a link to the manual page that describes the distribution tools–let me post it again:

In short, Panda provides a command-line tool that draws from a few short files that you create in order to build a distributable version of your program.

1 Like

You get this error if (1) you don’t have a .prc file listing a graphics plug-in in place, which should be in an “etc” subdirectory, or (2) the libpandagl.dll plug-in is not actually present. Plug-in DLLs are not copied automatically.

The built-in distribution tools do all this for you, as has been said.