Pygame is a cross-platform set of Python modules designed for writing video games. It is a library designed to be used with the Python programming language.
Here in this article, we will discuss how to install and setup PyGame on a windows 10 computer.
How to Install and Setup PyGame on Windows 10
Before installing PyGame on Windows 10 computers, we have to install and setup Python on our computer. As PyGame is a Python library.
Here is the complete guide on how you can download Python and PyGame library on window 10.
Step 1: Visit python.org and click on “Downloads“. This will open the download page for windows.
Step 2: Click on “Download Python 3.9.1” and it will start to download.
Step 3: After the download has been completed open the .exe file to install Python 3.9.1
Step 4: It will open the “Set-up Window” there you will find two installation option “Install Now” and “Customize Installation“.
Note:– If you want to change your installation location and want to add some of the specific features then click on “Customize Installation“.
Step 5: Now if you don’t want a customize installation then select “Install Now“. But before selecting Install Now, you have to check the box called “Add Python 3.9.1 to PATH“. Then wait a few times for the installation process to complete.
Step 6: After the setup has been completed just click on the “Close” button.
Note: After if you have python install on your computer, follow step 7 and step 8 to install PyGame.
Step 7: Now open “Command Prompt” as administrator and run this command to install PyGame on windows 10:
pip install pygame
Step 8: All these commands will install PyGame on Windows 10. Now we have to import PyGame on Windows 10 Command Prompt. For this, run this command: