I am trying to import pygame for my game but its saying there's no such module I've tried making new folders(and other things) but its still saying it not a module(I'm a beginner)
I had a similar issue with VS Code, if you are on windows you can try this: (if not you're going to have to read the docs for creating a virtual environment on your system with VS code.)
This is what I did and it worked.

Open windows powershell as administrator.

Turn off Execution Policy



Set-ExecutionPolicy Unrestricted

Once that is done, if you haven't done this already:

create a virtual environment in the terminal in VS Code.


python -m venv [env_name] #usally name of project + env


Now you have to:


Activate virtual environment:


path\to\env\Scripts\activate

you may have to use activat.ps1 or Activate.bat depending on your system. Just go into the environment folder that is created in your project folder and click Scripts. Once you do that you can scroll down and you will see a few files that start with activate. You can read each one to see which one you would need. But activate should work
Once that is activated you will see something like this:

(env_name) C:path\to\project\folder> 


Now you can install packages into your venv and use them in your VS Code Script
Pygame import problem VSC(visual studio code)