Python Forum
Using pygame with pycharm.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using pygame with pycharm.
#1
So i got using pygame with python. So i tried using pycharm. When i tried to import pygame i get this. Unused import statement. The funny thing is i tried importing it earlier and it worked fine import was highlighted and showed no errors. Then i tried again and nothing. So what does this mean.
Reply
#2
it looks like it is something specific with pycharm's inspection
https://stackoverflow.com/questions/2113...in-pycharm

try this in your pycharm project before the import statement? (unneeded if ran from anywhere else)
# noinspection PyUnresolvedReferences
import pygame
Recommended Tutorials:
Reply
#3
Ok that works so does that mean i have to do that every time i start a new project?
Reply
#4
im not sure. Possibly? I dont use Pycharm. It looks to be something with pycharm inspection system. You can possibly turn that off, use that code, etc. But you should be aware that it is only needed when ran through pycharm, not anywhere else (other IDE's, command line/terminal, etc.)
Recommended Tutorials:
Reply
#5
Ok thank you for the help
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pycharm dosnt load pygame Matres 1 1,969 Mar-16-2020, 02:15 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020