【发布时间】:2020-10-27 12:02:01
【问题描述】:
我正在尝试通过 python notify2 模块发送一个简单的桌面通知。代码如下:
import notify2
notify2.init('app name')
n = notify2.Notification('Test','This is a test','C:/Users/meneu/Documents/test.PNG')
n.show()
Notify2 需要 dbus-python 模块,但这就是问题所在。当我尝试通过 pip 安装它时,它会抛出此错误:
creating C:\Users\meneu\AppData\Local\Temp\pip-req-build-4qrgk1t2\build
creating C:\Users\meneu\AppData\Local\Temp\pip-req-build-4qrgk1t2\build\temp.win-amd64-3.7
error: [WinError 193] %1 is not a valid Win32 application
我的系统是 64 位的,我认为存在问题。有谁知道如何为 64 位安装 dbus?我正在使用 python 3.7。
我也尝试了 GLib 和 Gtk3,但也引发了很多错误。
提前致谢。
【问题讨论】:
标签: python python-3.x notify