Skip to content
Advertisement

PyOpenGL raises an exception after being frozen using cx_Freeze?

I am making a game in PyOpenGL and want to freeze it using cx_Freeze. But it seems to me that importing PyOpenGL raises an exception in the PyOpenGL module.

JavaScript

When I run the frozen script:

JavaScript

How can I solve this issue and get PyOpenGL to work?

EDIT: For people who don’t have PyOpenGL, the below function shows how it is working:

JavaScript

And also the platform plugin function:

JavaScript

Advertisement

Answer

Try to add "OpenGL" to the packages list of the build_exe_options in the setup.py script:

JavaScript

See the cx_Freeze documentation for further details.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement