How to Install Pygame on Windows ?
In this article, we will learn how to Install PyGame module of Python on Windows. PyGame is a library of python language. It is used to develop 2-D games and is a platform where you can set python modules to develop a game. It is a user-friendly platform that helps to build games quickly and easily.
Follow the steps given below for the successful installation of Pygame
Step 1: Check for Python Installation
In order to install Pygame, Python must be installed already in your system. To check whether Python is installed or not in your system, open the command prompt and give the command as shown below.
If this command runs successfully, and we are able to get a Python version then we are good to go. Otherwise, we have to install Python in our system, to do this refer How to install Python on Windows?
Step 2: Check for PIP installation
PIP is a tool that is used to install python packages. PIP is automatically installed with Python 2.7. 9+ and Python 3.4+. Open the command prompt and enter the command shown below to check whether pip is installed or not.
Note: Refer to How to install PIP on Windows ? for detailed information.
Step 3: Install Pygame
To install Pygame, open the command prompt and give the command as shown below:
pip install pygame
Pygame is successfully installed as shown in the image above.
Step 4: Check Whether PyGame is Working or not
Now open a new terminal and import the Pygame library to see whether it is working fine or not in our system. The library is imported successfully means we got success.
In this way, we can install the pygame module in Python.