繁体   English   中英

我如何使用已安装的 python 模块

[英]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. 编辑:我已经尝试过建议的遮阳篷,但它确实有效,这是一个截图,可能我做错了https://imgur.com/a/Zz5fR04

下载模块的pythonic方式是通过Pip

Pip 在安装 Python 时已经安装。

您可以在 cmd 中使用此命令下载playsound

pip install playsound

现在从模块中导入 function:

from playsound import playsound

然后你可以用这个调用playfound function:

playsound('/path/to/a/sound/file/you/want/to/play.mp3')

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM