Code:from p5 import *
Error
Traceback (most recent call last): File "C:\Users\Anvit\Desktop\Pygame\py.py", line 1, in from p5 import *
File "C:\Users\Anvit\AppData\Local\Programs\Python\Python37\lib\site-packages\p5__init__.py", line 19, in from .sketch import *
File "C:\Users\Anvit\AppData\Local\Programs\Python\Python37\lib\site-packages\p5\sketch__init__.py", line 19, in vispy.use('glfw')
File "C:\Users\Anvit\AppData\Local\Programs\Python\Python37\lib\site-packages\vispy\util\wrappers.py", line 96, in use use_app(app)
File "C:\Users\Anvit\AppData\Local\Programs\Python\Python37\lib\site-packages\vispy\app_default_app.py", line 47, in use_app default_app = Application(backend_name)
File "C:\Users\Anvit\AppData\Local\Programs\Python\Python37\lib\site-packages\vispy\app\application.py", line 49, in __init__ self._use(backend_name)
File "C:\Users\Anvit\AppData\Local\Programs\Python\Python37\lib\site-packages\vispy\app\application.py", line 223, in _use raise RuntimeError(msg)
RuntimeError: Could not import backend "Glfw":
[WinError 193] %1 is not a valid Win32 application
I've been trying to get P5 to work but this error appears no matter what I try. What I've Done
- Tried both 64 bit and 32 bit versions of GLFW from the official website. My machine is 64 bit windows 10 and python 3.7.1 64 bit version
- Tried to swap the glfw.dll in the python glfw installation with the glfw.dll file obtained from official website.
- One other answer recommended to modify glfw.py file such that it imports glfw.dll via absolute path rather than system variable path (Not sure how to do this). I have already added the folder
lib-mingw-w64
to the enivronment variable path