7

So this error keeps coming back.

Everytime I try to tun the script it returns saying:

Traceback (most recent call last):
  File "cli.py", line 11, in <module>
    import pynotify
ImportError: No module named pynotify

The strange thing is, I just installed this plugin. I also restarted command prompt already, even the computer.

But nothing, if anyone could help me out here that'd be great!

Olav Alberts
  • 71
  • 1
  • 1
  • 3

8 Answers8

4

Try this:

pip install py-notify

It worked for me.

Cleb
  • 25,102
  • 20
  • 116
  • 151
Kalyan Ram
  • 61
  • 1
  • 2
  • 8
2

You are most likely looking for pyinotify not pynotify. That should fix your ImportError.

Martin Konecny
  • 57,827
  • 19
  • 139
  • 159
2

Here is the solution for Ubuntu.

First install python-notify: sudo apt-get install python-notify After that you may need to add the right paths:

import sys
sys.path.append('/usr/lib/python2.7/dist-packages/gtk-2.0')
sys.path.append('/usr/lib/python2.7/dist-packages/')

Finally: import pynotify

max5555
  • 495
  • 5
  • 9
1

first check your pipversion and your python running version

pip --version, python --version

if the pip is from python3's packages. and you python environment is running at python2.x. so abandon using your pip to install any notify , you just install python-notify

victor
  • 11
  • 2
0

If what you install is py-notify (http://home.gna.org/py-notify/), it should be:

import notify
garry
  • 24
  • 3
  • hmm The script says: from datetime import datetime import os import sys import subprocess import getpass import sched import time import threading import psutil import signal import pynotify import Queue – Olav Alberts Nov 24 '14 at 02:49
0

Check whether you were using the corresponding pip version for your version of Python. For example, if you have Python2 and Python3 installed, you may have installed pynotify for Python2, and attempting to import it from Python3, which will result in the package not being found.

Try running

pip --version

Assuming pip install is how you installed the package as well as

python --version

to ensure the version numbers are similar.

Martin Konecny
  • 57,827
  • 19
  • 139
  • 159
0

Import package 'notify' instead of 'pynotify'

import notify
0

This error is because, you had run the Python file (mitmf.py) with python2. But you have installed pyinotify in python3-pip. So it will only run in pip2.To install it follow the link... https://linuxize.com/post/how-to-install-pip-on-ubuntu-20.04/

dippas
  • 58,591
  • 15
  • 114
  • 126
Dany G Sam
  • 21
  • 1