0

I am trying to send a simple desktop notification via the python notify2 module. Here is the code:

import notify2

notify2.init('app name')
n = notify2.Notification('Test','This is a test','C:/Users/meneu/Documents/test.PNG')
n.show()

Notify2 requires the dbus-python module, but here is the problem. When I try to install it via pip it throws this error:

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

My system is 64-bit and I think there lies the problem. Does anyone know how to install dbus for 64bit? I'm using python 3.7.

I also tried out GLib and Gtk3 but that threw a lot of errors also.

Thanks in advance.

Marius
  • 94
  • 8

1 Answers1

1

AFAIK, there is no DBus for Windows, and therefor no dbus-python for Windows.

Xtrem532
  • 756
  • 8
  • 19
  • Ah okay, know any viable alternatives? – Marius Oct 27 '20 at 12:22
  • I don't really know what you are trying to do, but if you want a desktop notification on windows I had this gem saved: https://stackoverflow.com/questions/15921203/how-to-create-a-system-tray-popup-message-with-python-windows There are probably more modern solutions out there tho, just google around. – Xtrem532 Oct 27 '20 at 12:25
  • Thanks for that link, I finally got something to work! – Marius Oct 29 '20 at 11:41