The Pygame Mixer module is not available

Viewed 966

Even in a blank program if I type the line of code,

 pygame.mixer.init()

PyCharm throws the error,

 NotImplementedError: mixer module not available (ModuleNotFoundError: No module named 'pygame.mixer')

My computer is running macOS Big Sur 11.4, and pycharm is running python 3.9 The version of pip that my computer says it has installed is 21.1.3

If anyone knows how to reinstall pip quickly or if there is some software I am missing in my computer the help would be greatly appreciated.

1 Answers

in pycharm, to use some modules you need to install them independently . in order to install the module open pycharm, in Pycharm select the following path

File >> Settings. Project >> Project Interpreter >>

and at the right you will find a '+' icon click on that, and search for Pygame, you will find a install button below click that. after the installation you are good to go.

to use pygame.mixer module try the code below

from pygame import mixer
mixer.init()
"""
Your code goes here
"""
Related