r/learnpython • • 13d ago

Issues related to setuptools while installing Pygame

I'm trying to install pygame on Python 3.15.2. I keep getting the following message:

ModuleNotFoundError: No module named 'setuptools._distutils.msvccompiler'

I've installed and updated buildconfig and setuptools. What am I missing?

2 Upvotes

7 comments sorted by

View all comments

1

u/kimiyah_Fremiot 11d ago

newer versions removed distutils completely and older C-based packages haven't all updated their build scripts to handle it when compiling from source. you'll save yourself a massive headache by just running your virtual environment on a slightly older stable release like 3.11 or 3.12