title: How to fix import sibling packages/modules in Python?
body: <p>I have this file structure</p>
  <pre><code>.
  └── sample
      ├── one
      │   ├── __init__.py
      │   └── util.py
      └── two
          ├── __init__.py
          └── test.py
  </code></pre>
  <p>Here is the content of util.py</p>
  <pre class="lang-py prettyprint-override"><code>def isOk():
      return True
  </code></pre>
  <p>Here is the content of test.py</p>
  <pre class="lang-py prettyprint-override"><code>from sample.one import util
  </code></pre>
  <p>Whenever I'm inside the [two] folder and I type</p>
  <pre class="lang-sh prettyprint-override"><code>python test.py
  </code></pre>
  <p>I get</p>
  <pre><code>Traceback (most recent call last):
    File &quot;test.py&quot;, line 1, in &lt;module&gt;
      from sample.one import util
  ModuleNotFoundError: No module named 'sample'
  </code></pre>
  <p>How is that possible when I create all folders and <code>__init__.py</code> by the book?</p>
  <p>It seems that a method to invoke it might be</p>
  <pre class="lang-sh prettyprint-override"><code>python -m two.test
  </code></pre>