dbus-python-错误:[WinError 193]%1不是有效的Win32应用程序

问题描述

我正在尝试通过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。

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...