Skip to content

Compiling on Windows

Andrew Coffey edited this page Feb 20, 2023 · 13 revisions

The Basic Steps

  1. Clone/Checkout pygame-ce from github.

  2. Install Visual Studio Build tools. Make sure you Install the "Desktop Development with C++" option (including optional components) to get the latest Visual Studio C compiler. See:

    image

  3. Open a "Developer Command Prompt":

    image

    Note:

    You'll want to make sure you're using the correct developer command prompt for your python architecture. If you're using 32-bit python, then look for vcvars32.bat and if you're using 64-bit python, then look for vcvars64.bat. Both of these files are installed if you did step 2 correctly, and the path will look something like C:\Program Files (x86)\Microsoft Visual Studio\$(year)\BuildTools\VC\Auxiliary\Build\vcvars(32/64).bat. Run the appropriate batch file in a command prompt to create a developer command prompt.

  4. cd into the pygame-ce directory on your PC.

  5. enter the following commands:

set DISTUTILS_USE_SDK=1
set MSSdk=1
python -m buildconfig --download
pip install .
  1. It should look a bit like this when it starts going:

    image