[Python] How can we use pygame on Google Colab?

Discussão em 'Python' iniciado por Stack, Maio 2, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to use q learning to automate my game and was thinking of using colab for some additional GPU support. After installing the requirements and running the code, colab gives out this error:

    > error:
    > Traceback (most recent call last)
    <ipython-input-16-28b090095233> in <module>()
    5
    6 pygame.font.init()
    ----> 7 pygame.display.list_modes()
    8 pygame.init()
    9

    >error: video system not initialized


    If someone can solve this error or tell me how to use VNC to solve this problem.

    I have tried pygame .init() as well as pygame.display.list_modes()

    Continue reading...

Compartilhe esta Página