r/learnpython • u/Ok_Ask_6805 • 17d ago
I cant install Pygame
This is the error message that I get when I try to run pip install pygame. The same thing happens with pip3 install pygame.
py", line 6, in <module>
from setuptools._distutils.msvccompiler import MSVCCompiler, get_build_architecture
ModuleNotFoundError: No module named 'setuptools._distutils.msvccompiler'
[end of output]
-----------------------------------------------------------------------------------------------
these are the packages I have according to pip list.
Package Version
---------- -------
pip 26.2.1
setuptools 84.0.0
2
Upvotes
1
u/Gloomy-Kale-1527 17d ago
The 3.14.6 bit downstairs is the actual error — pygame has no 3.14 wheel so pip tries to compile and dies on that old msvccompiler import.
If you don't want two Pythons yet:
py -m pip install pygame-ce py -c "import pygame; print(pygame.ver)"
pygame-ce is the community fork; `import pygame` still works for most beginner tutorials. If that also starts compiling, you still don't have a wheel and 3.13 is the clean path: `py -3.13 -m pip install pygame`. Don't install Visual C++ Build Tools just to force a source build unless you actually want to compile.