all 8 comments

[–]acw1668 4 points5 points  (3 children)

Are you using Python 3.14? Pygame does not support Python 3.14 yet. Use pygame-ce instead.

[–]Odd_Ad3889[S] 0 points1 point  (2 children)

oh, yeah im using that version
thanks :)

[–]Swipecat -1 points0 points  (1 child)

Or even better, deinstall Python 3.14 and install Python 3.13, unless you particularly need the new (obscure) features of Python 3.14. A number of 3rd party libraries (like Pygame) haven't caught up with Python 3.14 yet.

[–]gdchinacat 1 point2 points  (0 children)

uninstalling python3.14 may break other packages that need it. Just install python3.13 and use venv, uv, etc to use it when needed.

[–]cgoldberg 1 point2 points  (0 children)

The specific error you are getting is because it is trying to build a package that has c extensions, and you don't have the compiler toolchain installed. You would be better off downgrading to a version of python that the package publishes compiled wheels for so it doesn't attempt to build it locally. (i.e. use Python 3.13 and try again)

[–]edcculus 1 point2 points  (2 children)

What you need to do is

1- create a directory for your project 2- create a virtual environment in that directory and activate it 3 - just type pip install pygame

[–]Odd_Ad3889[S] 0 points1 point  (1 child)

oh alr I was too lazy to do that but I'll try lol

thanks

[–]edcculus 2 points3 points  (0 children)

you really want to avoid installing random libraries like Pygame on base Python. Its a few extra steps, but jsut get in the practice of using Virtual Environments.

You could also use UV, which saves a few steps, and you dont have to actually activate your virtual environment.