After you have identified your Python version, you can proceed to the following steps:
1. Enter the official website http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame Download the corresponding version of the Pygame, pay attention to distinguish between 32 bits and 64 bits.
Here wheel is a compression format that is easy to install in Python.
2. Install pip into cmd mode
Win+r (or enter CMD in the Start menu) into cmd mode via shortcut key
The default is C disk, but you need to switch to a specific directory when you install
Through the CD on the switch passed, and then pip install Whell, will prompt the PIP version is too low, need upgrade, then update
Update the input pip install--upgrade Pip, as shown in the update.
3. Install Wheel in cmd
or in the script directory, enter the PIP install wheel
4. Confirm whether the installation is in place
Enter PIP list
Show Pip (9.0.1)
Setuptools (12.0.5)
Wheel (0.29.0)
The instructions are all installed.
5. Install Pygame
Place the downloaded Pygame file in the script folder
In the cmd window, enter the PIP PYGAME-1.9.3-CP34M-WIN32.WHL (different version, only need to change the name of the file)
6. Check if the installation is in place
Enter the import Pygame and pygame.ver two statements in the Python idle to know the result
That's all, thanks ~