For me this command works.->py -m pip install -U pygame --user But first, make sure you properly configure your environment variables. This tutorial http://www.aaronstannard.com/how-to-setup-a-proper-python-environment-on-windows/ will help you how to setup environment variables for python, make sure you do it correctly only step 2 ,no need to do any other steps from this tutorial, now you can follow my steps that were listed below. I will assume that you have already installed python in your computer
Step1
Search for cmd and Right click on cmd and do run as administrator.
Step2
Run the command, py -m pip install -U pygame --user, but before you run this command first of all make sure you configure your environment variables properly.
Step3
Type python in command prompt, this will take you to the python command line which will look like this ">>>".If not then you have a problem with your system variables.
Step4
Make sure you are in python command line and then type import pygame,and after this press ctrl+z and enter that will take you out from python command line.
Step5
Make sure you are not in python command line and then run this command py -m pygame.examples.aliens,if the game starts then congrats you are done.
Answer from Ishan Anand on Stack OverflowFor me this command works.->py -m pip install -U pygame --user But first, make sure you properly configure your environment variables. This tutorial http://www.aaronstannard.com/how-to-setup-a-proper-python-environment-on-windows/ will help you how to setup environment variables for python, make sure you do it correctly only step 2 ,no need to do any other steps from this tutorial, now you can follow my steps that were listed below. I will assume that you have already installed python in your computer
Step1
Search for cmd and Right click on cmd and do run as administrator.
Step2
Run the command, py -m pip install -U pygame --user, but before you run this command first of all make sure you configure your environment variables properly.
Step3
Type python in command prompt, this will take you to the python command line which will look like this ">>>".If not then you have a problem with your system variables.
Step4
Make sure you are in python command line and then type import pygame,and after this press ctrl+z and enter that will take you out from python command line.
Step5
Make sure you are not in python command line and then run this command py -m pygame.examples.aliens,if the game starts then congrats you are done.
Answer from Ishan Anand on Stack OverflowFor me this command works.->py -m pip install -U pygame --user But first, make sure you properly configure your environment variables. This tutorial http://www.aaronstannard.com/how-to-setup-a-proper-python-environment-on-windows/ will help you how to setup environment variables for python, make sure you do it correctly only step 2 ,no need to do any other steps from this tutorial, now you can follow my steps that were listed below. I will assume that you have already installed python in your computer
Step1
Search for cmd and Right click on cmd and do run as administrator.
Step2
Run the command, py -m pip install -U pygame --user, but before you run this command first of all make sure you configure your environment variables properly.
Step3
Type python in command prompt, this will take you to the python command line which will look like this ">>>".If not then you have a problem with your system variables.
Step4
Make sure you are in python command line and then type import pygame,and after this press ctrl+z and enter that will take you out from python command line.
Step5
Make sure you are not in python command line and then run this command py -m pygame.examples.aliens,if the game starts then congrats you are done.
It can be possible that the pip/ wheel is not installed follow this link to install pip link
If already installed maked sure it is updated if not
You can use this code to update: python โm ensurepip โ-upgrade or pip install --upgrade pip
To install wheel pip install wheel or upgrade pip install wheel --upgrade
once this is done you are good to install pygame
At the command line, make sure youโre in the same directory as the .whl file and run
pip install package-name.whl
How to install PyGame on Windows 10
How to install pygame in Windows 10 for python 3.9? - Stack Overflow
Unable to install pygame on Python via pip (Windows 10) - Stack Overflow
How do I install pygame?
Videos
ยป pip install pygame
For people wanting to install Pygame on Windows 10, do try the command below:
Using windows powershell type:
pip3 install pygame - - only binary :all:
**Important note: The - - has no space inbetween them. I cant put both dashes tgt on reddit as it will look like this โ
Hope it helps and stay tune for more 9knows tech hacks.
You could use the pre-release version that supports Python 3.9.0.
python3 -m pip install pygame --pre --user
Many packages do not have pre-built wheels for Python 3.9 as it is new.
Also pygame-1.9.6-cp27-cp27m-win_amd64.whl is for Python 2.7
Your best bet is to revert to Python 3.8.6 to install pre-built wheel with pip
I downloaded the file and all and I tried to run everything people suggested in the terminal but nothing is working :( I checked all youtube tutorials but they don't explain an answer to my specific problem so I came here
how do i get installed pygame on python version 3.11.4