Let's get straight into it by installing the required software and then make sure everything is going to work properly. There are some very important steps you will need to take if you want to successfully import Pygame (you'll understand what this means later on!). So read and follow the instructions carefully!
If you are using an old computer, you may be running 32-bit Windows. Carefully check if you are running 32-bit or 64-bit Windows.
If you aren't sure which version of Windows you have, click on the search bar at the bottom of screen and find "About Your PC". Once you click on this, you can see in the Device specifications, under System Type which version you are using.It is best to do this at home, on your own network, or use a hot spot. It is believed there are issues with Department’s filtering system which prevent Python from the online upgrades.
WARNING: read the part at the top of this page before proceeding. You need to know if you are using 32 or 64-bit Windows.
Before beginning, if you have any previous versions of Python installed, you will need to uninstall them first.
Download below, but at installation...
Windows 64 users (most usres) - Download the 64-bit Python Installer Here.
Double-click on the file to run it, then...
... then click Install Now.
Slowly Download at school if possible, or use your home network
Open Windows PowerShell or Command Prompt
Type and enter: python -m pip install -U pygame --user
Open IDLE and type and enter import pygame and it should print the information in the image below.
If the above doesn't work, try this:
pip install pygame --pre --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org
1) Open IDLE (this is Python's Interactive Development Environment)
2) Type in import pygame into the shell and click enter:
1) Download the Pygame Wheel Here. You will need to click on the download icon that appears (top-right of screen) after you click this link.
2) View this file in your Downloads folder. Copy the location of the .whl file by right-clicking it and selecting Properties. You will find its location in the pop-up window. Highlight the location (as shown on the right) and press Ctr + C to copy. You will use this later on… (make sure you select all of the file path).
3) Next, open Command Prompt by typing it in the Windows search bar.
4) In the window, type: python –m ensurepip and then press Enter, like this:
5) Type: python –m ensurepip --upgrade and press Enter in the Command Prompt window.
6) Type: pip install wheel and press Enter.
7) Move to the directory of the ‘copied file’ [from step 2, above] by typing: cd [then paste] and hit enter. It should like this except with your own file path:
8) Lastly, you can copy/paste this into the command prompt window (and hit enter): pip install pygame-1.9.6-cp37-cp37m-win_amd64.whl
Hopefully you don't get error messages along the way!
9) Open IDLE and type and enter import pygame and it should print the information in the image below.
1) Open IDLE (this is Python's Interactive Development Environment)
2) Type in import pygame into the shell and click enter:
If you get a red error message, sorry… you’ll have to go back and try again... :(
If not, you're ready to start some REAL coding :)
Let's get started!