I’m trying to run a Mario Kart clone from a github repository on WSL (Debian), but my WSL doesn’t include X11. So, I would like to know if it’s possible to launch it from Jupyter lab. When I try to launch it, I get an error:
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM default
Traceback (most recent call last):
File "MarioKart.pyw", line 14, in <module>
screen = pygame.display.set_mode(MENU_DIMENSIONS)
pygame.error: No available video device
The github repo: https://github.com/s4rd0n1k/pygame_mariokart
2
Answers
Your immediate issue is a sound issue. This should be fixed by
Or whatever is necessary to set an environment variable in Jupyter Lab.
Beyond that, I don’t know if the graphics will work.
Install XLaunch and run it with all default settings except check "Disable access control"
Next add
To the top of your python file. This is working for me in WSL 2