Python Notes and Examples
← prev | next →     Top-level ToC     /pygame.html     (printable version)

PyGame is a toolkit built upon libSDL 1.2 for easily creating simple games in Python.

Links:

1 Prereqs

Currently (2017-08-30), Debian Testing comes with Python v3.5.4.

I note that my Debian system already has installed:

libsdl-image1.2:amd64
libsdl1.2debian:amd64

2 Install

$ . ~/py-venvs/my-env/bin/activate
$ which pip
$ pip install pygame
$ python -m pygame.examples.aliens
$ # play a game
$ pip install pyopengl
$ python -m pygame.examples.glcube
$ # watch the cube!
$ python
>>> import pygame
>>> pygame.ver
'1.9.3'
>>> pygame.get_sdl_version()
(1, 2, 15)