pygame.error: No available video device

前端 未结 6 1003
南方客
南方客 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:39

    On Linux you can solve the problem using x11.

    Verify that your SDL was built with x11 support, otherwise build it yourself only after that you added some libraries in this way:

    sudo apt install xorg-dev libx11-dev libgl1-mesa-glx
    

    Maybe xorg-dev already installs libx11-dev

    Build SDL from source and enjoy

提交回复
热议问题