2

I've cloned glumpy from Github and am trying to run glumpy\examples\app-simple.py

I can run the example fine if I install pyglet using pip install pyglet, (or, I think I can? The window causes some weird warnings if I click on certain parts of it, like the bar to drag the window around) but it will not recognize GLFW.

I have tried installing GLFW using pip, and also by following the instructions here: https://glumpy.readthedocs.io/en/latest/installation.html where you copy the glfw3.dll.

Here is the error exactly:

[w] Backend (<module 'glumpy.app.window.backends.backend_glfw' from 'C:\\Users\\Max\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\glumpy\\app\\window\\backends\\backend_glfw.py'>) not available
[w] Backend (<module 'glumpy.app.window.backends.backend_pyglet' from 'C:\\Users\\Max\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\glumpy\\app\\window\\backends\\backend_pyglet.py'>) not available
[w] Backend (<module 'glumpy.app.window.backends.backend_sdl' from 'C:\\Users\\Max\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\glumpy\\app\\window\\backends\\backend_sdl.py'>) not available
[w] Backend (<module 'glumpy.app.window.backends.backend_sdl2' from 'C:\\Users\\Max\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\glumpy\\app\\window\\backends\\backend_sdl2.py'>) not available
[w] Backend (<module 'glumpy.app.window.backends.backend_osxglut' from 'C:\\Users\\Max\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\glumpy\\app\\window\\backends\\backend_osxglut.py'>) not available
[w] Backend (<module 'glumpy.app.window.backends.backend_freeglut' from 'C:\\Users\\Max\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\glumpy\\app\\window\\backends\\backend_freeglut.py'>) not available
[w] Backend (<module 'glumpy.app.window.backends.backend_qt5' from 'C:\\Users\\Max\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\glumpy\\app\\window\\backends\\backend_qt5.py'>) not available
[w] Backend (<module 'glumpy.app.window.backends.backend_pyside' from 'C:\\Users\\Max\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\glumpy\\app\\window\\backends\\backend_pyside.py'>) not available
[x] No suitable backend found
Traceback (most recent call last):
  File "c:\Users\Max\.vscode\extensions\ms-python.python-2019.8.29288\pythonFiles\ptvsd_launcher.py", line 43, in <module>
    main(ptvsdArgs)
  File "c:\Users\Max\.vscode\extensions\ms-python.python-2019.8.29288\pythonFiles\lib\python\ptvsd\__main__.py", line 432, in main
    run()
  File "c:\Users\Max\.vscode\extensions\ms-python.python-2019.8.29288\pythonFiles\lib\python\ptvsd\__main__.py", line 316, in run_file
    runpy.run_path(target, run_name='__main__')
  File "C:\Users\Max\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "C:\Users\Max\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "C:\Users\Max\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "d:\VSCODEProjects\glumpy_escape_pyglet\glumpy\examples\app-simple.py", line 7, in <module>
    window = app.Window()
  File "C:\Users\Max\AppData\Local\Programs\Python\Python37\lib\site-packages\glumpy\app\__init__.py", line 157, in __new__
    raise NotImplementedError
NotImplementedError
Max Kessler
  • 169
  • 4
  • 12
  • 1
    error shows that it couldn't use `glfw` or any other backend. You could use `import glfw` to test if it has no problem to run this module. Maybe you will have to move .dll to different folder - to one of folder which is in variable `PATH` - `import os; print(os.environ['PATH'])`. I don't use Windows but as I remember there should be `C:\Windows\` on the list. – furas Aug 14 '19 at 01:15
  • I just had to add the directory which contained the .dll file to my PATH. – Max Kessler Aug 14 '19 at 02:40

2 Answers2

2

for me

pip install pyglet

can slove my question.

vtas Y
  • 29
  • 2
0

In mac installing glfw3 solved this

brew install glfw3
Mukundhan
  • 3,284
  • 23
  • 36