Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

9
Pygame install in VSCode, but cannot be found when I import it
Post Body

Hi,
I've recently install pygame via VS Code, and I did the check to ensure it's fully installed. I tried to test pygame by simply typing "import pygame" but an error came. It says that it cannot find pygame module.

Image 1: The \"check\" because when trying to install again, it says it's already installed.

Image 2: Testing pygame by simply importing it

Image 3: Error appears in terminal because pygame could not be found

Does anyone know what to do to fix the problem?

Thanks in advance!

Comments

VScode might be using the wrong interpreter. I faced something similar and, bottom right I think it says python3.11 and you can select it and change to another interpreter if one exists. Just something to check. Once I did that I could import and run pygame fine.

Author
Account Strength
50%
Account Age
4 months
Verified Email
Yes
Verified Flair
No
Total Karma
900
Link Karma
3
Comment Karma
897
Profile updated: 5 days ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 months ago