Reputation: 29
Does the playsound module work in Python 3.9.1? When I write the command:
from playsound import playsound
playsound('C:\\Users\\acer\\Desktop\\FOLDER\\Programming\\Python\\01_project\\Bella Ciao.mp3')
it doesn't run and shows the error message A problem occurred in initializing MCI.
But after that I have installed Python 3.5.0 and in that plays the sound without any error. So is the playsound module supported for Python 3.5.0 and not for 3.9.1? And also tell me other ways of inserting .mp3 files.
Upvotes: 0
Views: 3993
Reputation: 29
What may help is rolling back to an older version of playsound. You can do this by opening your command prompt and typing the following:
pip install playsound==1.2.2
This will roll back the version of your playsound module to an older 1.2.2 version. Also, playsound was made for older versions of python, and seems to be buggy in the newer versions(versions>3.8).
Upvotes: 1
Reputation: 7646
As you can see from the pypi.org here ==> playsound 1.2.2
At the moment it supports only up to Python 3.5.0 .
Regarding your question of other ways to Play a mp3 sound in Python, I can suggest you to have a look at this other StackOverflow Answer ==> Playing mp3 song on python.
Playsound
is good options by the way.
Upvotes: 1