问题描述
我正在尝试通过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,但这也引发了很多错误。
谢谢。
解决方法
AFAIK,Windows没有DBus,因此Windows没有dbus-python。