title: ImportError: No module named 'gdbm' occuring while using source ~/.bashrc
body: <p>Hey after making some changes in the bashrc I tried to use </p>
  
  <pre><code>source ~/.bashrc
  </code></pre>
  
  <p>but got the following error</p>
  
  <pre><code>baaz@FireStorm:~$ source ~/.bashrc
  Traceback (most recent call last):
    File "/usr/lib/python3.5/dbm/gnu.py", line 4, in &lt;module&gt;
      from _gdbm import *
  ImportError: No module named '_gdbm'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 7, in &lt;module&gt;
      import dbm.gnu as gdbm
    File "/usr/lib/python3.5/dbm/gnu.py", line 6, in &lt;module&gt;
      raise ImportError(str(msg) + ', please install the python3-gdbm package')
  ImportError: No module named '_gdbm', please install the python3-gdbm package
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/usr/lib/command-not-found", line 27, in &lt;module&gt;
      from CommandNotFound.util import crash_guard
    File "/usr/lib/python3/dist-packages/CommandNotFound/__init__.py", line 3, in &lt;module&gt;
      from CommandNotFound.CommandNotFound import CommandNotFound
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 9, in &lt;module&gt;
      import gdbm
  ImportError: No module named 'gdbm'
  </code></pre>
  
  <p>I tried using the install commands as mentioned in the error</p>
  
  <pre><code>baaz@FireStorm:~$ sudo apt-get install python3-gdbm
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  python3-gdbm is already the newest version (3.6.5-3~16.04.york0.2).
  python3-gdbm set to manually installed.
  0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  </code></pre>
  
  <p>Also some solutions mentioned to use version specific commands, but still got no solution</p>
  
  <pre><code>baaz@FireStorm:~$ sudo apt-get install python3.5-gdbm
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  Package python3.5-gdbm is a virtual package provided by:
    python3-gdbm 3.5.1-1 [Not candidate version]
  
  E: Package 'python3.5-gdbm' has no installation candidate
  </code></pre>
  
  <p>The pip install command gave the following error</p>
  
  <pre><code>baaz@FireStorm:~$ sudo pip3 install gdbm --upgrade
  The directory '/home/baaz/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
  The directory '/home/baaz/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
  Collecting gdbm
    Could not find a version that satisfies the requirement gdbm (from versions: )
  No matching distribution found for gdbm
  </code></pre>
  
  <p>Please suggest a way to sort out these error.</p>