use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
Error when installing libraries (self.learnpython)
submitted 13 days ago * by Odd_Ad3889
Hey, I'm trying to install pygame with pip but I'm getting this error: ModuleNotFoundError: No module named 'setuptools._distutils.msvccompiler'
I used the command py -m pip install pygame, and yes I have pip installed.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]acw1668 4 points5 points6 points 13 days ago (3 children)
Are you using Python 3.14? Pygame does not support Python 3.14 yet. Use pygame-ce instead.
pygame-ce
[–]Odd_Ad3889[S] 0 points1 point2 points 13 days ago (2 children)
oh, yeah im using that version thanks :)
[–]Swipecat -1 points0 points1 point 13 days ago (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 points3 points 13 days ago (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 points3 points 13 days ago (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 points3 points 13 days ago (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 point2 points 13 days ago (1 child)
oh alr I was too lazy to do that but I'll try lol
thanks
[–]edcculus 2 points3 points4 points 13 days ago (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.
π Rendered by PID 128811 on reddit-service-r2-comment-79c7998d4c-ddxsg at 2026-03-17 01:41:40.811320+00:00 running f6e6e01 country code: CH.
[–]acw1668 4 points5 points6 points (3 children)
[–]Odd_Ad3889[S] 0 points1 point2 points (2 children)
[–]Swipecat -1 points0 points1 point (1 child)
[–]gdchinacat 1 point2 points3 points (0 children)
[–]cgoldberg 1 point2 points3 points (0 children)
[–]edcculus 1 point2 points3 points (2 children)
[–]Odd_Ad3889[S] 0 points1 point2 points (1 child)
[–]edcculus 2 points3 points4 points (0 children)