Install pygame and pgzero

sudo apt-get install python3-pygame python3-pgzero

pgzrun myprogram.py

Simple Code

Before running the following code, create a folder called 'images' and store a PNG file of a rocket in it.

import pgzrun

myrocket = Actor('rocket', center=(400, 500))

def draw():
  screen.clear()
  myrocket.draw()

def update():
  myrocket.y -= 1

pgzrun.go()

Sources: