0

I'm using visual studio code with python, and i'm trying to make a game using pygame. When I try importing pygame an error comes and it says

Import "pygame" could not be resolved ''

What confuses me is that i tried running the exact same code in pycharm and it worked without any problems. It also has no problem importing other modules. For some reason only pygame is the one that gives the error.

I tried restarting my PC and visual studio code. I tried selecting different python interpreters witch I don't fully understand so maybe I did something wrong there. If anyone has any ideas on how to fix this I would appreciate it.

lemon
  • 14,875
  • 6
  • 18
  • 38
Bruc
  • 1
  • 1
  • did you installed Python plugin in VS code? https://marketplace.visualstudio.com/items?itemName=ms-python.python If yes, then it will automatically imported pygame module, if it is not, then you have to check selected env – Pandurang Choudekar Dec 25 '22 at 11:15

0 Answers0