title: Python import local package that is already installed
body: <p>I have installed this python module <a href="https://github.com/gunthercox/ChatterBot" rel="nofollow noreferrer">https://github.com/gunthercox/ChatterBot</a> and now I downloaded the project to modify things locally. The problem is that when I execute an <a href="https://github.com/gunthercox/ChatterBot/blob/master/examples/basic_example.py" rel="nofollow noreferrer">example</a> of the <code>examples</code> folder, it still loads the installed package. I tried <a href="https://stackoverflow.com/questions/714063/importing-modules-from-parent-folder">Importing modules from parent folder</a> but it says:</p>
  
  <pre><code>import os,sys,inspect 
  currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.curr‌​entframe()))) 
  parentdir = os.path.dirname(currentdir) 
  sys.path.insert(0,parentdir)    
  import chatterbot
  </code></pre>
  
  <blockquote>
    <p>Parent module '' not loaded, cannot perform relative import</p>
  </blockquote>
  
  <p>I think it will only work for simple <code>.py</code> files, not an entire project. Tried <a href="https://stackoverflow.com/a/11158224/5884503">this answer</a> from the same question and it worked but broke for all the other imports inside the project. </p>
  
  <p>Shouldn't these examples be adapted to work locally already, as they're rapidly tested by the developer? How to import the package locally?</p>