DavidBuchanan314 / pyswargol

A rather fast Game-of-Life implementation in pure Python (plus pysdl2)
MIT License
33 stars 0 forks source link

SDL Issue #3

Open qtndm opened 5 months ago

qtndm commented 5 months ago

Hello, I installed sdl etc but when i launch the program it says me this :

Traceback (most recent call last): File "C:\Users\nayth\PycharmProjects\pyswargol\swargol.py", line 444, in main(cfg) File "C:\Users\nayth\PycharmProjects\pyswargol\swargol.py", line 363, in main raise Exception("Failed to init SDL2") Exception: Failed to init SDL2

Do you have any idea on how to fix this ? Thank you for your help.

DavidBuchanan314 commented 5 months ago

I'd recommend raising this issue with the pysdl2 devs https://github.com/py-sdl/py-sdl2

diimdeep commented 4 months ago

Fixed for me on macos https://github.com/DavidBuchanan314/pyswargol/blob/bb8a748065bbe6f7a1c0bf4a331b42e178e9d821/swargol.py#L51

import sys
if sys.platform.startswith('linux'): os.environ["SDL_VIDEODRIVER"] = "x11"