I'm trying to setup pygame in my python virtualenv so that I can read controller data in using pygames Directinputs. I'm on windows 10 using the developer command line (basically bash mounted onto the windows system.) I have pygame installed, but I'm getting the error: pygame.error: No Available video device
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4292:(_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:4292:(_snd_config_evaluate) function snd_func_concat
returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_refer returned
error: No such file or directory
ALSA lib conf.c:4771:(snd_config_expand) Evaluate error: No such file or
directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
Traceback (most recent call last):
File "Controller.py", line 36, in <module>
screen = pygame.display.set_mode(size)
pygame.error: No available video device
I have tried using the command sudo apt-get build-dep python-pygame to get all the dependencies which seemed to download around 180 new files that I hoped would fix it, but of course didn't. I've also tried uninstalling and reinstalling pygame but that didn't do anything either. I think it is an SDL problem, or at least that is what google has yielded so far. I tried using
import os
os.environ["SDL_VIDEODRIVER"] = "directx"
and the other SDL_VIDEODRIVER flags, but none of them seem to change anything. Any suggestion as to how I can get the code to work? My code is simply the example program for pygames joystick object, so if you need reference Here it is.