Nuitka: [glfw] ImportError: Failed to load GLFW3 shared library
After compiling and starting the excecutable via CMD, we get:
Traceback (most recent call last):
File "C:\Users\ADMINI~1\PYCHAR~1\NUITKA~1\APP~1.DIS\app.py", line 6, in <module>
File "C:\Users\ADMINI~1\PYCHAR~1\NUITKA~1\APP~1.DIS\concur\__init__.py", line 17, in <module concur>
File "C:\Users\ADMINI~1\PYCHAR~1\NUITKA~1\APP~1.DIS\concur\integrations\__init__.py", line 8, in <module concur.integrations>
File "C:\Users\ADMINI~1\PYCHAR~1\NUITKA~1\APP~1.DIS\concur\integrations\glfw.py", line 4, in <module concur.integrations.glfw>
File "C:\Users\ADMINI~1\PYCHAR~1\NUITKA~1\APP~1.DIS\glfw\__init__.py", line 43, in <module glfw>
ImportError: Failed to load GLFW3 shared library.
(The missing DLL is located in venv\glfw\glfw3.dll) If we manually copy it over and attempt to run again we get:
Traceback (most recent call last):
File "C:\Users\chwba\PYCHAR~1\NUITKA~1\APP~1.DIS\OpenGL\latebind.py", line 43, in __call__
TypeError: 'NoneType' object is not callable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\chwba\PYCHAR~1\NUITKA~1\APP~1.DIS\app.py", line 23, in <module>
File "C:\Users\chwba\PYCHAR~1\NUITKA~1\APP~1.DIS\concur\integrations\glfw.py", line 118, in main
File "C:\Users\chwba\PYCHAR~1\NUITKA~1\APP~1.DIS\imgui\integrations\glfw.py", line 13, in __init__
File "C:\Users\chwba\PYCHAR~1\NUITKA~1\APP~1.DIS\imgui\integrations\opengl.py", line 91, in __init__
File "C:\Users\chwba\PYCHAR~1\NUITKA~1\APP~1.DIS\imgui\integrations\opengl.py", line 23, in __init__
File "C:\Users\chwba\PYCHAR~1\NUITKA~1\APP~1.DIS\imgui\integrations\opengl.py", line 115, in _create_device_objects
File "C:\Users\chwba\PYCHAR~1\NUITKA~1\APP~1.DIS\OpenGL\latebind.py", line 47, in __call__
File "C:\Users\chwba\PYCHAR~1\NUITKA~1\APP~1.DIS\OpenGL\wrapper.py", line 668, in wrapperCall
File "C:\Users\chwba\PYCHAR~1\NUITKA~1\APP~1.DIS\OpenGL\wrapper.py", line 471, in calculate_cArgs
File "C:\Users\chwba\PYCHAR~1\NUITKA~1\APP~1.DIS\OpenGL\converters.py", line 251, in __call__
File "C:\Users\chwba\PYCHAR~1\NUITKA~1\APP~1.DIS\OpenGL\converters.py", line 196, in __call__
File "C:\Users\chwba\PYCHAR~1\NUITKA~1\APP~1.DIS\OpenGL\arrays\arraydatatype.py", line 177, in zeros
File "C:\Users\chwba\PYCHAR~1\NUITKA~1\APP~1.DIS\OpenGL\arrays\arraydatatype.py", line 84, in get_output_handler
RuntimeError: ('Unable to find any output handler at all (not even ctypes/numpy ones!)', 'Failure in cConverter <OpenGL.converters.SizedOutputOrInput object at 0x00000000610C61C0>', (GL_TEXTURE_BINDING_2D, <object object at 0x0000000060774750>), 1, <OpenGL.platform.baseplatform.glGetIntegerv object at 0x00000000610C5C80>)
Compiled with:
python -m nuitka --follow-imports^
--show-progress^
--show-scons^
--assume-yes-for-downloads^
--warn-unusual-code^
--plugin-enable=pylint-warnings^
--plugin-enable=numpy^
--windows-dependency-tool=pefile^
--experimental=use_pefile_recurse^
--experimental=use_pefile_fullrecurse^
--standalone^
--mingw64^
app.py
Log: https://nextcloud.mnwd.in/s/XN434Jf4Sz5yzwd
Used requirements:
concur
concur-imgui >= 1.3.9
glfw
PyOpenGL
imageio
imageio-ffmpeg
Code snippet to reproduce:
import time
from concurrent.futures import ThreadPoolExecutor
import concur as c
executor = ThreadPoolExecutor()
def timer():
yield from c.orr([c.text(""), c.button("Start timer")])
yield
future = executor.submit(lambda: time.sleep(3))
yield from c.orr([c.text("waiting for 3s..."), c.button("Cancel"), c.Block(future)])
def app():
return c.orr([c.forever(timer) for _ in range(3)])
if __name__ == "__main__":
c.main(app(), "Timers")
Nuitka
0.6.11.3
Python: 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)]
Executable: C:\Users\Administrator\.pyenv\pyenv-win\versions\3.9.1\python.exe
OS: Windows
Arch: x86_64
Installed via python -m pip install nuitka
Important note
If we try to run this code on a machine which cannot render opengl and the above error would be fixed, we would get GLFWError: (65542) b'WGL: The driver does not appear to support OpenGL' warnings.warn(message, GLFWError) which is then considered ‘normal’. To efficiently test it we need to run the compiled code on a machine which can render opengl (any > i5 processor or a proper GPU will suffice).
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 47 (34 by maintainers)
Part of the current pre-release, I expect to make a release relatively soon.