ImportError: No module named pynotify, despite having the module installed
<pre><code>&gt;&gt;&gt; import pynotify
Traceback (most recent call last):
File "&lt;stdin&gt;", line 1, in &lt;module&gt;
ImportError: No module named pynotify
&gt;&gt;&gt; 
</code></pre>

<p>I have installed py-notify module. This is the error I'm getting when I import it and I'm losing my mind thinking about it.</p>

<p>I just wonder if it's the problem with the path. When I print out <code>sys.path</code>, I get this output. Any suggestions?</p>

<pre><code>&gt;&gt;&gt; import sys
&gt;&gt;&gt; for x in sys.path:
...     print x
... 

/usr/local/lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/li b/python27.zip
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/site-packages
/usr/local/lib/python2.7/site-packages/gtk-2.0
/usr/local/lib/python2.7/site-packages/gtk-2.0
&gt;&gt;&gt; 
</code></pre>

<p>By reading the <a href="http://home.gna.org/py-notify/tutorial.html" rel="nofollow">tutorial</a> on <code>py-notify</code> you will clearly see how you are <em>supposed</em> to import it. </p>

<p>You are supposed to use:</p>

<pre><code>import notify
</code></pre>

<p>Here is a full example of me pip installing py-notify in a new python 2 virtualenv, replicating your problem, and then importing properly, per what the tutorial stated: </p>

<pre><code>â¶ pip install py-notify
Collecting py-notify
  Using cached py-notify-0.3.1.tar.gz
Building wheels for collected packages: py-notify
  Running setup.py bdist_wheel for py-notify ... done
  Stored in directory: /Users/####/Library/Caches/pip/wheels/50/af/6b/dd4386701fdb578f06c4c52e1dea195ae43b8bf9a7d0320e16
Successfully built py-notify
Installing collected packages: py-notify
Successfully installed py-notify-0.3.1
(venv2)
~/dev/rough
â¶ python
Python 2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; import pynotify
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
ImportError: No module named pynotify
&gt;&gt;&gt; import notify
&gt;&gt;&gt; dir(notify)
['__builtins__', '__doc__', '__docformat__', '__file__', '__name__', '__package__', '__path__', '__version__', 'version_tuple']
&gt;&gt;&gt;
</code></pre>

python pynotify