Oct 23, 2018 By Team YoungWonks
In this blog, we shall look at the procedure to install PyGame on a Windows PC. Now PyGame is cross-platform set of modules in the Python programming language. These modules are designed for writing video games. Thus PyGame includes computer graphics and sound libraries that have been created to be used with the Python programming language.
Now how do we do install PyGame on a Windows computer? Let us start by looking at how one can install Python on a Windows PC.
The video below tells you how to do so...
Now that we have installed Python on the Windows PC, we can go on to install PyGame.
Installation of PyGame on Windows:
- Start by closing any IDLE or Python window that might be open. This could include the shell or the program itself.
- Click on the Start menu and open IDLE.
- Now click on File at the top and then select Open.
- Then double click on Scripts folder and open it.
- At the top, you’ll see Scripts written; right click on Scripts and select Copy address as text.
- Go to the Start menu again and open Command Prompt by typing cmd.
- Now type cd followed by space and then paste the copied address / location.
- After this, press Enter.
- Now type pip3 install pygame like you see on the screen.
- Wait for the successful installation message and your PyGame installation is done.
- You can test if PyGame has been installed on your Windows OS by typing import pygame in your IDLE.
- If there’s no error, it means PyGame has been successfully installed on your Windows computer.