0

I've installed pygame on my Mac (running macOS11.1). When I do the py -m pygame.examples.aliens test in my command prompts, it works.

However, when I try to import pygame on Spyder (running python 3.9.2 and spyder 4.2.4), I keep getting

ModuleNotFoundError: No module named 'pygame'

What should I do?

yang xue
  • 1
  • 1
  • 1

1 Answers1

0

With the newer versions of python (or any programming language), there will always be bugs. I also had problems with a lot of my pip-installer modules, so I downgraded to Python 3.8.7, the latest bug-fix for python 3.8. I don't know if this solves your problem though. Another thing you can try is to type pip3 install pygame or python3 -m pip install pygame so that it downloads to your python3 and not the python2 default on macOS.

Dugbug
  • 454
  • 2
  • 11