0

I am trying to run pygame in the online IDE Codenvy. I am running Chrome OS on a Chromebook with download restrictions, thus why I am not using IDLE. The IDE has a terminal which I used to install pygame (with pip). I have imported and initiated pygame in my code, so this is not the problem. Whenever I try to draw a window with

window = pygame.display.set_mode((500, 480))

I get the error "pygame.error: No available video device."

I have read elsewhere that this is caused by a problem with SDL, but I don't know how to fix this, especially on a Chromebook. Also note that the issue is not specific to my computer or operating system because I have the same error on a MacBook, but not when running the program in IDLE.

Any help with this would be much appreciated. Thanks.

  • 1
    Just because you were able to install pygame doesn't mean the host has hardware it supports. This doesn't surprise me, since pygame must operate at a relatively low level, hardware-wise, to do the things it does. – martineau May 06 '19 at 19:57
  • if you run code online on server then it try to use video card installed in server and monitor connected to server. But servers mostly don't need video cards and monitors. But even if server would have video card and monitor then you wouldn't see it. PyGame and SDL was created to run on local computer and use local video card and local monitor - not to run remotly. – furas May 06 '19 at 23:32

0 Answers0