Here is the solution I tried:
From left bottom of your vs code you can find python environment, you can in the image I marked red:

after clicking in the red marked area you can see below option to select:

from the option select your desired one. Suppose first i was try selecting 2nd one but it was not working then i tried with the last one and it worked.
Answer from Md Nakibul Hassan on Stack OverflowHere is the solution I tried:
From left bottom of your vs code you can find python environment, you can in the image I marked red:

after clicking in the red marked area you can see below option to select:

from the option select your desired one. Suppose first i was try selecting 2nd one but it was not working then i tried with the last one and it worked.
- Open the terminal of Vscode.
- Type
pip install pygameorpip3 install pygame. - Import pygame and enjoy it.
i already tried everything but it keeps saying that vscode doesnt know the pip command, and i can only find tutorials where the pip commande is involved
Can not install pygame to VS code 2022
pygame, visual studio code
Can anyone help me with importing Pygame to Visual Studio Code?
how do i install pygame to vscode?
Videos
Hello. Recently i have treid to change the IDE from Pycharm to VS code. However i do not know how to install it. Firstly, in the extensions tab there are 2 pygames.
Here they areI have downloaded the most popular, however i cant import it. I have also tried to use pip install, but it sayd that i already have a pygame, however, i am again not able to import this. What can i do with it?
Can smb help me with installing pygame on vs code, i know that i have to write “pip install pygame” but how to use it to install, guys idk, yesterday i tried installing it FOR SHITTY 3 HOURS… help please… im sorry
upd: now i have it glitch while installing… i don’t remember what it said, but smth about wheel…
For my school assignment, I've got to create a project, I thought of making a game and the code editor that they have in school is Visual Studio Code.
I am trying (at home) to import pygame to VSC and having some troubles.
The top part of the picture is showing that nothing is coming up when I am trying to import it and the lower half is me hoping I've installed everything correctly and opening the mini-game.
Screen shot.
Any help or suggestions would be really appreciated;
and thanks a lot for your time :D