pygame.error: No available video device

前端 未结 6 1006
南方客
南方客 2020-12-11 04:11

I have this setup:

 $ python -V
Python 2.7.2+
 $ python -c \"import pygame; print pygame.__version__\"
1.9.1release

When I run a pygame scr

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-11 04:41

    From similar experience the most likely problem is something is wrong with one of your SDL packages. Try running the following.

    import pygame
    pygame.init()
    pygame.display.list_modes()
    

    If you get back an empty list, it's definitely because of the packages. Try reinstalling them.

    Possibly related:

    • SDL init failure, reason is: No available video device

    • SDL init failure, reason is: No available video device in ubuntu 12.04 LTS

提交回复
热议问题