Two different solutions for pip install pygame installation errors:
One: If pip has been installed in python , but pip install pygame reports an error, you can try the following steps:
(1) Start, enter cmd
(2)pip install wheel
(3)pip install pygame
Two: Another reason for the error is the version problem. At this time, the following warning will appear when downloading pygame:
ERROR: Could not find a version that satisfies the requirement pygeme (from versions: none)
ERROR: No matching distribution found for pygeme
WARNING: You are using pip version 21.2.4; however, version 23.1 is available.
You should consider upgrading via the 'C:\Users\jih\AppData\Local\Programs\Python\Python310\python.exe -m pip install --upgrade pip' command.
For this kind of problem, we only need to copy the content in the warning quotes, namely:
C:\Users\jih\AppData\Local\Programs\Python\Python310\python.exe -m pip install --upgrade pip
Finally, we can successfully install pygame: