title: Using Ubuntu Python packages and ImportError: No module named
body: <p>How to install Ubuntu's packaged modules instead of using <code>pip</code>?</p>
  
  <p>All Python packages tell us to do the packages installation via <code>pip</code>, but Ubuntu has its own packaging system. I'd rather stick to using the system default packaging system instead of cooking my own using <code>pip</code>, but is that a good idea? </p>
  
  <p>Searching for "<code>ImportError: No module named</code>" you'll get all kinds of such error for all kinds of different Python modules. I'm wondering if there is a general solution to use Ubuntu system default packaging system instead. </p>
  
  <p>Specifically, I installed <code>python-jsonpath-rw</code> with</p>
  
  <p><code>sudo apt-get install python-jsonpath-rw</code></p>
  
  <p>but when I tried to do </p>
  
  <p><code>import sys, json, jsonpath</code></p>
  
  <p>I get:</p>
  
  <pre><code>Traceback (most recent call last):
    File "./pyjsonpath", line 2, in &lt;module&gt;
      import sys, json, jsonpath
  ImportError: No module named jsonpath
  </code></pre>
  
  <p>I then searched, and found
  <a href="http://blog.ingensol.pl/2015/03/need-to-make-quick-json-fixes-jsonpath.html" rel="nofollow noreferrer">http://blog.ingensol.pl/2015/03/need-to-make-quick-json-fixes-jsonpath.html</a></p>
  
  <p>and followed all its commands, </p>
  
  <pre><code>$ sudo apt-get install python-jsonpath-rw
  $ sudo apt-get install python-setuptools
  $ sudo easy_install -U jsonpath
  </code></pre>
  
  <p>but am still getting the exact same errors as before. </p>
  
  <p>Please help. Thx. </p>
  
  <pre><code>$ apt-cache policy python-jsonpath-rw
  python-jsonpath-rw:
    Installed: 1.4.0-2
    Candidate: 1.4.0-2
    Version table:
   *** 1.4.0-2 500
          500 http://ca.archive.ubuntu.com/ubuntu zesty/main amd64 Packages
          500 http://ca.archive.ubuntu.com/ubuntu zesty/main i386 Packages
          100 /var/lib/dpkg/status
  
  $ dpkg -L python-jsonpath-rw
  /.
  /usr
  /usr/bin
  /usr/bin/python2-jsonpath
  /usr/lib
  /usr/lib/python2.7
  /usr/lib/python2.7/dist-packages
  /usr/lib/python2.7/dist-packages/jsonpath_rw
  /usr/lib/python2.7/dist-packages/jsonpath_rw/__init__.py
  /usr/lib/python2.7/dist-packages/jsonpath_rw/bin
  /usr/lib/python2.7/dist-packages/jsonpath_rw/bin/__init__.py
  /usr/lib/python2.7/dist-packages/jsonpath_rw/bin/jsonpath.py
  /usr/lib/python2.7/dist-packages/jsonpath_rw/jsonpath.py
  /usr/lib/python2.7/dist-packages/jsonpath_rw/lexer.py
  /usr/lib/python2.7/dist-packages/jsonpath_rw/parser.py
  /usr/lib/python2.7/dist-packages/jsonpath_rw-1.4.0.egg-info
  /usr/lib/python2.7/dist-packages/jsonpath_rw-1.4.0.egg-info/PKG-INFO
  /usr/lib/python2.7/dist-packages/jsonpath_rw-1.4.0.egg-info/dependency_links.txt
  /usr/lib/python2.7/dist-packages/jsonpath_rw-1.4.0.egg-info/entry_points.txt
  /usr/lib/python2.7/dist-packages/jsonpath_rw-1.4.0.egg-info/requires.txt
  /usr/lib/python2.7/dist-packages/jsonpath_rw-1.4.0.egg-info/top_level.txt
  /usr/share
  /usr/share/doc
  /usr/share/doc/python-jsonpath-rw
  /usr/share/doc/python-jsonpath-rw/changelog.Debian.gz
  /usr/share/doc/python-jsonpath-rw/copyright
  
  $ python -c "import sys, pprint; pprint.pprint(sys.path)"
  ['',
   '/usr/lib/python2.7',
   '/usr/lib/python2.7/plat-x86_64-linux-gnu',
   '/usr/lib/python2.7/lib-tk',
   '/usr/lib/python2.7/lib-old',
   '/usr/lib/python2.7/lib-dynload',
   '/usr/local/lib/python2.7/dist-packages',
   '/usr/local/lib/python2.7/dist-packages/jsonpath-0.75-py2.7.egg',
   '/usr/lib/python2.7/dist-packages']
  </code></pre>