Home > Software engineering >  Why does visual studio code not recognize that i have Pygame installed?
Why does visual studio code not recognize that i have Pygame installed?

Time:10-29

I installed pygame through cmd using pip install pygame which can be seen in the ss. For some reason im unable to import it in my main.py file. Is there some way for me to fix this?(screenshot of terminal and vscode file)

CodePudding user response:

I faced the same issue, but I had used the terminal. What I had done:

  1. Deleted pygame which was installed via pip.

  2. Installed it from the official website.

  3. Then imported pygame. It fixed the issue. I use linux

Alternatively, you can open the app installer of your device and search "pygame". Hopefully the module shows up.

  • Related