r/learnpython • u/ReputationOk9896 • Nov 03 '26
when trying to download pygame, the cmd prompt cant build the wheel.
so this is what i get:
PS C:\Users\(user)> pip3 install pygame
Collecting pygame
Using cached pygame-2.6.1.tar.gz (14.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... -
and then no other prompts pop up. Idk why.
i've tried restarting the download and it even prompted me to update the pip. after doing so, the same result happens.
1
Upvotes
3
u/SpiderJerusalem42 Nov 03 '26
Use pygame-ce pygame itself is out of support iirc.
1
u/Fast-Station1106 Nov 03 '26
Ich hatte das auch, Lösung war dann eine ältere Python version zu installieren, glaube 3.12 oder so pygame wird wohl nicht weiterentwickelt undxdeswegen der Stress, hab ich irgendwo gelesen und deswegen älteres python nehmen, bei hatces dann sofort geklappt(in Thonny damals auch lokal python 3.12 ausgewählt via Menü, das intergrierte wollte nicht(zu neu, wheel fehler))
1
u/FreeLogicGate 27d ago
Use uv, you'll save yourself a lot of pain and suffering.
https://docs.astral.sh/uv/
1
u/Discordbothost 27d ago
that freeze after "Getting requirements to build wheel" isn't pip crashed — it couldn't find a wheel (the .tar.gz is the source tarball) so it starts compiling, and windows just sits there if you don't have the visual studio C++ build tools.
one thing that bites people here: pip3 and python are sometimes different installs. run
py -0pto see every interpreter, then install withpy -m pip install pygame-ceso it goes into the same one you'll actually run. pygame-ce is the maintained fork and has wheels for newer python. if you specifically need classic pygame, 3.12 usually has a prebuilt wheel and skips this compile mess.1
u/AngelOfLight Nov 03 '26
This usually happens when you don't have a suitable C compiler installed on your machine. So, either install Visual Studio, or select one of the pre-built wheels available at https://pypi.org/project/pygame/#files.
Just look for a wheel that matches your OS and Python version, and install it directly using
pip install [package name]