I use visual studio code for coding (python) and now I have to write a program with pygame for my project and I can't import pygame
in visual studio code (I can import
it with the python script, it just can't be import
ed in visual studio code).
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.
pip install pygame
or pip3 install pygame
.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With