title: Can't import package from parallel directory
body: <p>I have 3 folders in my project: <code>scripts</code> , <code>src</code>, <code>tests</code>. In <code>scripts</code>, I have a script to populate my local db with test data (<code>populate_db.py</code>). In the <code>tests</code> folder, I have a file called <code>generators.py</code>, which I'm trying to import into <code>populate_db.py</code> , but I'm not having any luck. I have this:</p>
  <pre><code>code_path = Path(&quot;../&quot;)
  sys.path.append(code_path / &quot;tests&quot;)
  from generators import UserFactory
  </code></pre>
  <p>but I get the error <code>ModuleNotFoundError: No module named 'generators'</code>. Strange thing, is I do</p>
  <pre><code>sys.path.append(code_path / &quot;src&quot;)
  from users.models import User
  </code></pre>
  <p>and that imports fine. Not sure what I've done differently/wrong. I also tried a relative import: <code>from ..generators import UserFactory</code>, but got <code>attempted relative import with no known parent package</code>. I do have <code>__init__.py</code> in the parent and tests directories (though there are no python files in the parent, only in the 3 children).</p>