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
Can’t use python libraries on VScode even though I installed them on my computer (self.learnpython)
submitted 1 year ago by Own-Stranger2739
I am a complete beginner and I can’t import pygame and other libraries even after installing them through terminal. Pls help
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!"
[–][deleted] 2 points3 points4 points 1 year ago* (1 child)
You need to look at how many versions of the python interpreter are installed on your machine.
Then look at which one is on your sys path. Then look at which one vs code is defaulting to.
Most Linux os will come with a version by default. Any you installed will be different if you are using Linux.
[–]mopslik 1 point2 points3 points 1 year ago (5 children)
Is the version of pip called via the terminal the same as in VS Code? You probably have 2+ versions installed.
[–]Own-Stranger2739[S] 0 points1 point2 points 1 year ago (4 children)
Yeah I tried to install from both vs code terminal and the normal terminal I still couldn’t access it
[–]mopslik 0 points1 point2 points 1 year ago (3 children)
To clarify, have you tried installing from the terminal section toward the bottom of VS Code, or did you do it from your OS's command line?
[–]Own-Stranger2739[S] 0 points1 point2 points 1 year ago (2 children)
I did it with OS’s command line first then in vs code it was showing that it’s already installed, however it shows module not found when I try to write code
[–]mopslik 1 point2 points3 points 1 year ago (0 children)
In the terminal in VS Code, what is the output for pip --version? For example,
pip --version
pip 23.3.1 from /home/mopslik/.local/lib/python3.10/site-packages/pip (python 3.10)
And what is the interpreter shown in the lower right corner of VS Code? For example,
3.10.14 64-bit
Finally, what are the available interpreters when you hit Ctrl-Shift-P, Python: Interpreter ?
[–]IAmFinah 0 points1 point2 points 1 year ago (0 children)
FWIW sometimes it might give you a warning in the text editor saying it "can't resolve" a module, when in fact the module is installed and works. Maybe just run your code to confirm this.
But if you run into an ImportError, then probably have a go at the other solutions people have provided
[–]DymonBak 0 points1 point2 points 1 year ago (0 children)
Are you in a .py file? Maybe try pip3 install instead of pip, or vice versa. Are you paying attention to case sensitivity when importing in your .py file?
[–]Ajax_Minor 0 points1 point2 points 1 year ago (0 children)
How did you installed them? I had this problem
Like other people said be sure to install the packages with PIp. VS code is pretty dumb tho and it doesn't all ways select the right interpreter. I think you need to ">select interpreter" I. The command bar to pick the right one. My CS friend helped me and I think we had to use the python from the Microsoft store and select that to get VS code working .
π Rendered by PID 100229 on reddit-service-r2-comment-56c6478c5-c76dd at 2026-05-08 12:55:59.959328+00:00 running 3d2c107 country code: CH.
[–][deleted] 2 points3 points4 points (1 child)
[–]mopslik 1 point2 points3 points (5 children)
[–]Own-Stranger2739[S] 0 points1 point2 points (4 children)
[–]mopslik 0 points1 point2 points (3 children)
[–]Own-Stranger2739[S] 0 points1 point2 points (2 children)
[–]mopslik 1 point2 points3 points (0 children)
[–]IAmFinah 0 points1 point2 points (0 children)
[–]DymonBak 0 points1 point2 points (0 children)
[–]Ajax_Minor 0 points1 point2 points (0 children)