title: Import from sibling directory - Python 3.7
body: <p>I've read some articles about modules and packages in Python (including their own tutorial), but couldn't get it to work properly on my project. I'm using Python 3.7.5</p>
  
  <p>This is my directory structure:</p>
  
  <pre><code>framework/
      __init__.py
      build/
      classifiers/
      extraction/
          extractionFile.py
      quality/
      utils/
          utilsFile.py
  </code></pre>
  
  <p>On extractionFile.py I have this line:</p>
  
  <pre><code>from ..utils.utilsFile import functionName
  </code></pre>
  
  <p>But when I run the extractionFile.py from the extraction directory I get the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "extractionFile.py", line 25, in &lt;module&gt;
      from ..utils.utilsFile import functionName
  ImportError: attempted relative import with no known parent package
  </code></pre>
  
  <p>If I run extractionFile.py from the framework directory using:</p>
  
  <pre><code>from utils.utilsFile import functionName
  </code></pre>
  
  <p>It works properly.</p>
  
  <p>So how can I turn only the utils directory into a package in order to import any file that is inside of it from siblings directories?</p>
  
  <p><strong>Note:</strong> I only need to use the package on this project.</p>
  
  <p><strong>Note:</strong> I'm trying to get a permanent solution, so sys.path.insert() doesn't seem to be an option.</p>
  
  <hr>
  
  <p><strong>Edit:</strong> The answer marked as correct works, but I ended up with a different solution. From the framework directory simple run (I'm using Linux):</p>
  
  <pre><code>DIR=$(pwd) &amp;&amp; export PYTHONPATH="${PYTHONPATH}:$DIR"
  </code></pre>
  
  <p>This puts the framework directory on sys.path variables for Python. Making it a path for Python to look for packages and modules.</p>
  
  <p>I guess you just use the one that suits better for your case.</p>