Hm, if you have all the dependencies installed, see if you can run "import sdl2" from the python REPL environment (ie run python3 from the command line). Do you get the same error from there?
i've now solved the issue [had to reinstall pysdl2 and pysdl2-dll, also installed pillow 9.5 (as opposed to 10.0) for the ANTIALIAS error i got.] but now when i run python3 playscii.py it throws back this
File "/home/USERNAME/.local/lib/python3.9/site-packages/OpenGL/contextdata.py", line 40, in getContext
raise error.Error(
OpenGL.error.Error: Attempt to retrieve context when no valid context
CPU: x86_64
GPU: Mesa/X.org - virgl
OpenGL detected: 3.1 Mesa 20.3.5
GLSL detected: 1.40
Vertex Array Object support found.
Maximum supported texture size: 16384 x 16384
Detected screen resolution: 1366 x 688, window: 1092 x 550
Detecting software environment...
OS: Linux-5.10.114-16025-ge75506b9d98e-x86_64-with-glibc2.31
Python: 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] (64bit)
Modules: PySDL2 0.9.16, numpy 1.26.4, PyOpenGL 3.1.7, appdirs 1.4.4, PIL 9.5.0
SDL: 2.28.0 SDL-release-2.30.0-0-g859844eae, SDLmixer: 2.6.1
/home/USERNAME/playscii/playscii/playscii.py:429: DeprecationWarning: ANTIALIAS is deprecated and will be removed in Pillow 10 (2023-07-01). Use LANCZOS or Resampling.LANCZOS instead.
img = img.resize((32, 32), Image.ANTIALIAS)
Traceback (most recent call last):
File "/home/USERNAME/playscii/playscii/playscii.py", line 1170, in <module>
app = Application(config_dir, documents_dir, cache_dir, logger,
File "/home/USERNAME/playscii/playscii/playscii.py", line 315, in __init__
self.gw = GameWorld(self)
File "/home/USERNAME/playscii/playscii/game_world.py", line 118, in __init__
self.grid = GameGrid(self.app)
File "/home/USERNAME/playscii/playscii/renderable_line.py", line 60, in __init__
GL.glVertexAttribPointer(self.pos_attrib, self.vert_items,
File "/home/USERNAME/.local/lib/python3.9/site-packages/OpenGL/latebind.py", line 63, in __call__
return self.wrapperFunction( self.baseFunction, *args, **named )
File "/home/USERNAME/.local/lib/python3.9/site-packages/OpenGL/GL/VERSION/GL_2_0.py", line 469, in glVertexAttribPointer
contextdata.setValue( key, array )
File "/home/USERNAME/.local/lib/python3.9/site-packages/OpenGL/contextdata.py", line 58, in setValue
context = getContext( context )
hopes this helps! i really appreciate you assisting with all of this lol, thank you.
Wild guess, but is your desktop using X11 or Wayland? PyOpenGL is pretty ancient and creaky at this point, and I recall Wayland making it trickier in various ways for it to get a context it considered valid.
If you are indeed running Wayland, I'd say try to run from the latest Playscii source (last public commit was August 2022) as I did add a few things after 9.17.1 for working on newer Linux desktops.