PyCharm loading pygame issue (kivy)

I get the following when I run my (kivy) app in PyCharm...

ERROR: pygame.macosx import FAILED

The app used to work before I upgraded kivy, this however still runs from the command line. I presume this is a matter of allowing PyCharm to find pygame, but I don't know how to do that.
10 comments
Hello Joel,
Could you please try opening Settings | Python Interpreters, selecting the interpreter that you're using for your project and pressing the Reload button in the Paths tab?
0
Thanks for the quick reply, I just tried that, it didn't seem to help.
0
Sorry, I'm not sufficiently familiar with Kivy to tell you the specific path. Is there any additional information displayed in the error message (a stacktrace, for example)?
0
I think all related to not finding the pygame import:

[INFO   ] [Window      ] Provider: pygame
ERROR: pygame.macosx import FAILED
[WARNING] [WinPygame   ] SDL wrapper failed to import!
[DEBUG  ] [Window      ] Ignored <sdl> (import error)
[DEBUG  ] [Window      ] Ignored <x11> (import error)
[CRITICAL] [Window      ] Unable to find any valuable Window provider at all!
[CRITICAL] [App         ] Unable to get a Window, abort.
0
I restarted PyCharm, didn't seem to help, it appears pygame is under one of the paths listed:

/Applications//Kivy.app/Contents/Resources/lib/sitepackages/pygame
0
Okay, got it. For some reason turning off adding content/source roots to PYTHONPATH in the runtime config fixed it.
0
How do you do that exactly, could you give me a location in the settings area?
0
its not in the settings area. You need to edit the run configuration for your app.
0
Thanks, I appreciate the help.
0

Please sign in to leave a comment.