Skip to content

Compiling on Windows

Ankith edited this page Jun 29, 2024 · 13 revisions
  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

    Alternatively you can also install the MinGW compiler.

  3. Open a Command Prompt/Terminal window. I personally create a PyCharm project and use the one built into PyCharm, but there are many options at this point. Optionally - you may also want to create a virtual environment at this point. There are several virtual environment libraries including the built-in venv. If you are using PyCharm it can create a virtual environment for you when first cloning or creating a project. A virtual environment can help keep the dependencies of multiple projects separate so you don't experience library version clashes.

  4. If not there already, cd into the pygame-ce directory from where you checked it out on your PC in step 1.

  5. Enter the following command:

    pip install .

    image

  6. It should look a bit like this when it starts going:

    image

    That's it! You should be able to run the tests and examples now.

  7. You may also check out the Advanced compilation guide (for developers) if you are getting into development or are running into issues.