1

When I import pygame, I get the above error message. When I pip install and pip3 install pygame in PyCharm, Sublime, and my computer terminal, I get this message:

Requirement already satisfied: pygame in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (2.0.1)

and yet I continuously get the error message when I try running a pygame program. How should I troubleshoot? Is there a way to reorganize the python 3 location in my Path?

  • OS is macOS Catalina 10.15.17

  • In the terminal, python -V returns python 2.7.16 and python3 - V returns 3.9.1

Any help is appreciated!

CryptoFool
  • 21,719
  • 5
  • 26
  • 44
naffer.c
  • 11
  • 1
  • 2
    In PyCharm, you should never be relying on what's in your PATH. Your project will be using a particular Python interpreter, but then you may be running your code with a Run Configuration that specifies a different Python version. And then, there's which version of Python you're installing your modules into. You need to know which version of Python you're installing your modules into, and then cause PyCharm to run your code via that same version by modifying your Run Configuration to match. I would suggest that you not mess with your PATH. – CryptoFool Jan 20 '21 at 04:43
  • make sure that you have installed `pygame` –  Jan 20 '21 at 05:33

0 Answers0