pythoncrashexepyinstalleropenexr

PyInstaller and OpenEXR - exe crashes


I am using PyInstaller 3.3.1 and OpenEXR 1.3.0 in my project.

I create single file executable with --onefile option.


This works as intended:

import sys
if getattr(sys, 'frozen', False):
    print("hello world")

"hello world" is simply output into console and program closes.


This on the other hand makes exe crash (no errors are displayed):

import sys
import OpenEXR

if getattr(sys, 'frozen', False):
    print("hello world")

I tried debugging the program, to see if OpenEXR module is being properly included in exe. It is.


  1. What can be the other reason of the crash?
  2. Is there any way to make the exe tell me why it crashes?

Solution

  • I found the workaround to the problem. Instead of working with OpenEXR directly, I used pyexr - the wrapper library over OpenEXR. Exe doesn't crash anymore.