PyGame is a set of cross-platform modules in the Python programming language, which means you can install it on any operating system, and this article from MiniTool Partition Wizard tells you how to install PyGame on Windows 10.

How to Install PyGame on Windows 10?

PyGame depends on Python, which means you must install Python before installing PyGame. Here is the guide about installing PyGame on Windows 10.

Install Python on Windows 10

Note: Before downloading the Python, you need to check your computer version and system type by navigating the path: Settings > System > About. The latest version of Python is not applicable to Windows 7 or earlier. This means you can only use Python 3 on Windows 8 or later versions.

check computer version and system type

Step 1: Visit the Python website and download the latest version of Python 3. If you are using a 32-bit system, please select Windows installer (32-bit); if you are using a 64-bit system, please select the Windows installer (64-bit).

download Python

What Is the Difference Between 32 Bit and 64 Bit (x86 vs x64)
What Is the Difference Between 32 Bit and 64 Bit (x86 vs x64)

Do you know what difference between 32 bit and 64 bit? What does x86 and x64 mean? In today’s article, you will get detailed information about x64 vs x86.

Read More

Step 2: Open the Python installer, check the Install launcher for all users (recommended) and Add Python 3.10 to PATH boxes. Then click Install Now.

install Python

Or you can click the Customize Installation option and make sure the following boxes are checked: Documentation, pip, tcl/tk and IDLE, Python test suite, py launcher, for all users (requires elevation). Then click Next.

click Next

After entering the Advanced Options dialog box, you must also check the following boxes here: Install for all users, Add Python to the environment variables. Others you can choose according to your needs. Then click Install.

install Python

Install PyGame on Windows 10

Once finish Python setup on Windows 10, you can start to try installing PyGame on Windows 10.

Step 1: Locate the Python folder.

By default, the Python folder is located at C:Program Files. So, you can open the File Explorer and then go to the path to locate the Python folder.

Step 2: Copy the path/address of the Python folder.

Right click the Python name at the top of the File Explorer screen, and then click Copy Address. The copied address looks like “C:Program FilesPython310”.

copy the Python folder address

Step 3: Create the path.

After copying the address, you need to create a path in the environment variable.

  1. Open the Control Panel and navigate to the path: System and Security > System > Advanced System Settings > Environment Variables.
  2. Choose Path and click Edit > New, and then paste the path copied from the File Explorer into the empty text box generated on the environment variables panel.
  3. Click OK twice to save the changes.

choose Path and click Edit

Step 4: Open Command Prompt as an administrator.

  1. Open the Start menu and search for cmd in the search box.
  2. Right-clicking the search result and select Run as administrator.

Step 5: In the Command Prompt, type cd and a space, and then right-click in the Command Prompt to paste the path into Python. Then press Enter.

cd C:Program FilesPython310

Step 6: Type cd Scripts in the command prompt and press Enter.

Step 7: Type pip install pygame and press Enter to install Pygame.

Pygame should have been successfully installed on Windows 10. To verify this, type python and press Enter to start the Python interactive interpreter. Then type import pygame in the interpreter and press Enter.

If there is no error after typing import pygame in the interpreter, you have successfully installed Pygame on Windows. You can now use the Pygame library to write any graphics program you want.

Python Is Not Recognized as Internal or External Command [Fixed]
Python Is Not Recognized as Internal or External Command [Fixed]

The Python is not recognized as internal or external command issue when running Windows Command Prompt, but it confuses many people. Here are fixes.

Read More

Bottom Line

As you can see, a complete guide on how to install PyGame on Windows 10 is illustrated in the post. If you have any questions about this method, please leave them in the comment zone and we will try to answer them as soon as possible.

  • linkedin
  • reddit