pygame install windows 10 code example
Example 1: install pygame
python3 -m pip install pygame <<<(mac)>>>
or
python -m pip install pygame <<<(windows)>>>
or
sudo apt install python3-pygame <<<(ubuntu)>>>
Example 2: how to install pygame
pip install pygame
pip install pygame
Example 3: install pygame on mac
python3 -m pip install -U pygame==2.0.0.dev6
Example 4: pygame install
pip install pygame
Example 5: pygame setup
import pygame
pygame.init()
win = pygame.display.set_mode((500,500))
pygame.display.set_caption("First Game")
x = 50
y = 50
width = 40
height = 60
vel = 5
run = True
while run:
pygame.time.delay(100)
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
pygame.quit()