【发布时间】:2021-05-04 21:53:38
【问题描述】:
首先感谢您花时间阅读本文:
我目前正在尝试让 ToastNotifier 在 MU 的 python 中工作。 我已经从 win10toast 导入了 ToastNotifier :
from win10toast import ToastNotifier
我已经创建了这个函数:
def notifacation():
toast = ToastNotifier()
Title = "Notifacation"
message = "Hello from Ben Colledge"
icon = "a.ico"
length = 30
toast.show_toast(title, message, icon_path=icon, duration=length)
然后像这样调用函数:
notifacation()
然后我运行代码,它给了我这个错误消息
回溯(最近一次通话最后一次):
文件“c:\users\puzzl\mu_code\notifacation.py”,第 1 行,在模块中
从 win10toast 导入 ToastNotifier
ModuleNotFoundError: 没有名为“win10toast”的模块
然后我去了https://pypi.org/project/win10toast/并下载了win10toast但什么也没发生
任何帮助将不胜感激 谢谢
【问题讨论】:
-
尝试通过命令提示符
pip install win10toast安装它 -
感谢回复,
-
我试过了,它说以下'pip'不是内部或外部命令、可运行程序或批处理文件。