[glfw] ImportError: Failed to load GLFW3 shared library
See original GitHub issueAfter 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).
Issue Analytics
- State:
- Created 3 years ago
- Comments:47 (34 by maintainers)
Top Results From Across the Web
"ImportError: Failed to load GLFW3 shared library" without root ...
I'm trying to run a Python3 code found on GitHub on a remote machine that I don't have root access. The code requires...
Read more >Import error when trying to load import "pg" module in python3
ImportError : Failed to load GLFW3 shared library. >>> root@npgs-fedora ~]# pip3 install glfw WARNING: Running pip install with root ...
Read more >GLFW3 issue prevents pupil from working - Google Groups
import glfw. File "C:\Python27\lib\site-packages\glfw.py", line 169, in <module> raise ImportError("Failed to load GLFW3 shared library.")
Read more >Install pyGlfw on Mac OS X El Capitan - support - GLFW
Just doing import glfw, I obtain the error. Traceback (most recent call last): ... raise ImportError(“Failed to load GLFW3 shared library.”)
Read more >“ImportError: Failed to load GLFW3 shared library” without root ...
I'm trying to run a Python3 code found on GitHub on a remote machine that I don't have root access. The code requires...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Part of the current pre-release, I expect to make a release relatively soon.
Part of the 0.6.13 release.