title: How do i import from parent directory in python?
body: <p>I'm trying to import from a parent folder. The folder structure is (ignore the names)</p>
  <pre><code>experiments
      __init__.py
      poppy.py
      ostepop
          __ init__.py
          importio.py
     nopop
          __ init__.py
          loggio.py
  
  </code></pre>
  <p>I tried adding <code>__init__.py</code>to every folder, but it didn't have any affect</p>
  <p><code>import experiments.ostepop.loggio</code>gives error message:</p>
  <blockquote>
  <p>ModuleNotFoundError: No module named 'experiments'</p>
  </blockquote>
  <p>and <code>from ..experiments import poppy</code> gives</p>
  <blockquote>
  <p>ImportError: attempted relative import with no known parent package</p>
  </blockquote>
  <p>Any tips on how to import poppy.py or loggio.py from importio.py?</p>