Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i use installed python modules

Tags:

python

I installed a module package (playsound) and I've been stuck trying to use it, I have tried opening the package from cmd but nothing worked , I dont know how to use this package , please help . edit : I have tried suggested awnsers but it didint work , here is a screenshot maybe im doing something wrong https://i.sstatic.net/bCORU.jpg

like image 309
rovvan Avatar asked Jun 17 '26 20:06

rovvan


1 Answers

The pythonic way of downloading modules is through Pip

Pip is already installed when you install Python.

You can download playsound using this command in cmd:

pip install playsound

Now import the function from the module:

from playsound import playsound

Then you can call the playfound function with this:

playsound('/path/to/a/sound/file/you/want/to/play.mp3')
like image 120
BlackDereker Avatar answered Jun 20 '26 10:06

BlackDereker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!