r/learnpython • u/Ok_Ask_6805 • Aug 25 '26
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
View all comments
1
u/Diapolo10 I write code for a living -- https://github.com/Diapolo10 Aug 25 '26
pygamedoesn't have official wheels for Python 3.14 and newer, so Python is trying to compile it on its own (because you're presumably using 3.14). It fails because you probably don't have Microsoft Visual C++ Build Tools installed.