[英]How do i use installed python modules
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. 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://imgur.com/a/Zz5fR04
编辑:我已经尝试过建议的遮阳篷,但它确实有效,这是一个截图,可能我做错了https://imgur.com/a/Zz5fR04
The pythonic way of downloading modules is through Pip下载模块的pythonic方式是通过Pip
Pip is already installed when you install Python. Pip 在安装 Python 时已经安装。
You can download playsound using this command in cmd:您可以在 cmd 中使用此命令下载playsound :
pip install playsound
Now import the function from the module:现在从模块中导入 function:
from playsound import playsound
Then you can call the playfound
function with this:然后你可以用这个调用
playfound
function:
playsound('/path/to/a/sound/file/you/want/to/play.mp3')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.