Download Pygame

Pygame is distributed as a Python package, so you install it with pip rather than downloading an installer. Here are the current versions, supported systems and the exact commands.

2 min readUpdated
On this page
Current pygame and pygame-ce releases
pygamepygame-ce
Latest version2.6.12.5.8
Released
Install commandpip install pygamepip install pygame-ce
Prebuilt wheels for Python3.6 – 3.133.10 – 3.14
Minimum Python (package metadata)>=3.6>=3.10
Wheels forWindows (32-bit, 64-bit); macOS (Intel, Apple silicon); Linux (x86_64, aarch64, i686)Windows (32-bit, 64-bit, ARM64); macOS (universal2); Linux (x86_64, aarch64, i686)
LicenseLGPL-2.1LGPL-2.1
Official pagepygame on PyPIpygame-ce on PyPI

Checked against PyPI on November 28, 2026. The browser editor uses pygame-ce 2.4.1 on Python 3.12 (Pyodide 0.27.7).

The one command you need#

Terminal
python -m pip install pygame

Prefer the community edition? Install it instead (not both):

Terminal
python -m pip install pygame-ce

Pygame isn't a program you download and double-click. It's a library for Python, published on the Python Package Index (PyPI), and pip, the installer that comes with Python, downloads the right prebuilt package ("wheel") for your system automatically. There is no official standalone .exe or .dmg installer, so be wary of sites offering one.

Requirements#

  • Python 3: get it from python.org. Choose a version that has prebuilt Pygame wheels (see the table above); brand-new Python releases can take a while to be supported by pygame.
  • pip: included with Python. Check with python -m pip --version.
  • An operating system with prebuilt wheels: Windows, macOS or Linux on common processors. Elsewhere pip has to compile from source, which needs a C compiler and SDL development libraries.

Install step by step#

Choose your system for detailed instructions, including PATH problems and permissions:

Use a virtual environment#

A virtual environment keeps each project's packages separate, avoids permission errors and is required by some Linux distributions:

Terminal
python -m venv .venv
# Windows:
.venv\Scripts\activate
# macOS and Linux:
source .venv/bin/activate

python -m pip install pygame

While the environment is active, python and pip refer to the project's own copies. Run deactivate to leave it.

Check that it works#

Terminal
python -c "import pygame; print(pygame.version.ver)"
python -m pygame.examples.aliens

The first command prints the installed version; the second opens a small example game that ships with Pygame.

Upgrade or uninstall#

Terminal
python -m pip install --upgrade pygame
python -m pip uninstall pygame

To switch from pygame to pygame-ce, uninstall one before installing the other. Both provide the pygame module, and having both installed in one environment causes conflicts.

Common installation errors#

MessageLikely cause and fix
No module named pygameInstalled into a different Python than the one running your code. Fix it.
'pip' is not recognized / command not foundUse python -m pip (or py -m pip on Windows).
error: externally-managed-environmentYour Linux or Homebrew Python blocks system-wide installs. Use a virtual environment.
Building wheel fails, mentions sdl2-config or compilersNo prebuilt wheel exists for your Python version. Use a supported Python, or try pygame-ce. Details.

More in Pygame not installing.

Official sources#

Install Pygame only from these official locations:

Pygame.net does not host or modify Pygame binaries; the commands above download them from PyPI.

License#

Pygame and pygame-ce are free and open source under the GNU Lesser General Public License version 2.1 (LGPL-2.1). You can use them in free and commercial games. If you distribute a modified version of the library itself, the LGPL's terms apply.

↑ ↓ to moveEnter to openEsc to close