I am trying to install and use pygame on macOS through IDLE. I have used the pip install pygame command and the terminal says that pygame is installed on my computer. However, whenever I use "import pygame" I get an error that says:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import pygame
ModuleNotFoundError: No module named 'pygame'
How do I fix this? I am running python version 3.9.7 and the pygame I have installed is version 2.1.2