1

When i used to code pynotify for python2.7 in Windows 10 then it shows an error that module object has no attribute 'init'. And i have already done to install the init module but same error occur. so what are the possible solutions for this problem? here the code is.

import pynotify
pynotify.init("Basic")
n = pynotify.Notification("Title","Some sample content")
n.show()
Itchydon
  • 2,572
  • 6
  • 19
  • 33
hkjoshi
  • 11
  • 2

1 Answers1

1

It looks like the pynotify package you are looking for was initially designed for linux and was never supposed work on windows

The pynotify package installable through pip is just a name collision, and is not what not what you are looking for. (as this stackoverflow thread shows : I have already installed pynotify, still getting error no module named pynotify)

The package you want has GTK dependencies and can be installed in linux-based systems through the package management system using commands like : sudo apt-get install pynotify.

Other similar packages like notify2 (https://pypi.python.org/pypi/notify2) require linux components like dbus, and thus are not windows compatible.

If you're looking for a way to make windows 10 notifications, you can probably have look at this repository https://github.com/jithurjacob/Windows-10-Toast-Notifications.

Thundzz
  • 675
  • 1
  • 11
  • 15