title: How to Import python package from another directory?
body: <p>I have a project that is structured as follows:</p>
  
  <pre><code>project
  ├── api
  │   ├── __init__.py
  │   └── api.py
  ├── instance
  │   ├── __init__.py
  │   └── config.py
  ├── package
  │   ├── __init__.py
  │   └── app.py
  ├── requirements.txt
  └── tests
      └── __init__.py
  </code></pre>
  
  <p>I am trying to call the <code>config.py</code> file from the <code>package/app.py</code> as shown below: </p>
  
  <pre><code># package/app.py
  from instance import config
  
  # I've also tried
  import instance.config
  import ..instance.config
  from ..instance import config
  </code></pre>
  
  <p>But I always get the following error: </p>
  
  <pre><code>Traceback (most recent call last):
    File "/home/csymvoul/projects/project/package/app.py", line 1, in &lt;module&gt;
      from instance import config
  ModuleNotFoundError: No module named 'instance'
  </code></pre>
  
  <p>Modifying the <code>sys.path</code> is not something I want to do. 
  I know that this question is very much answered but the answers that were given, did not work for me. </p>
  
  <p><strong>EDIT:</strong> When moving the <code>app.py</code> to the root folder it works just fine. But I need to have it under the <code>package</code> folder.</p>