[Python] Pygame window not showing on macOS Catalina

Discussão em 'Python' iniciado por Stack, Novembro 27, 2024.

  1. Stack

    Stack Membro Participativo

    Running:
    macOS Catalina 10.15.1
    Python 3.8.0
    Pygame 1.9.6
    IDE - Visual Studio Code 1.40.2

    When I launch the Pygame test:

    python3 -m pygame.examples.aliens


    The music begins playing and after about 5 seconds the app closes. No window appears. The icon in dock shows up until it's closed.

    The same thing happens with a basic test code such as

    import pygame

    pygame.init()
    screen = pygame.display.set_mode((400, 300))
    done = False

    while not done:
    for event in pygame.event.get():
    if event.type == pygame.QUIT:
    done = True

    pygame.display.flip()


    There are no error messages in the terminal.

    Anybody have this issue? I've tried reinstalling both Python 3.8.0 from the website (as recommended in a different thread) as well as Pygame.

    Continue reading...

Compartilhe esta Página