title: Python: name of parent package not recognized in import statements
body: <p>I understand that there are many questions on this topic, but most of the answers I've seen describe complex workarounds to problems that should, it seems to me, be simple. Here is my directory structure:</p>
  
  <pre><code>Mapper/
      LICENSE.txt
      README.txt
      setup.py
      bin/
          # nothing here, yet
      mapper/
          __init__.py
          process.py
          where.py
          # ...
          binconvert/
              __init__.py
              tocsv.py
              todict.py
              # ...
  </code></pre>
  
  <p>I would like to use absolute paths on all of my locally developed modules to decrease confusion and to avoid the bugs mentioned <a href="http://effbot.org/pyfaq/what-are-the-best-practices-for-using-import-in-a-module.htm" rel="noreferrer">here</a>.</p>
  
  <p>However, I am having multiple issues with this. When I run <code>process.py</code>, in which I <code>import</code> <code>tocsv.py</code> like so,</p>
  
  <pre><code>from mapper.binconvert import tocsv
  </code></pre>
  
  <p>I get the error: <code>ModuleNotFoundError: No module named 'mapper'</code></p>
  
  <p>I know I could have done <code>from binconvert import tocsv</code>, but like I said I am trying to have all my locally developed module imports use absolute paths.</p>
  
  <p>I get the same error as before in <code>tocsv.py</code> when I am trying to import <code>where.py</code> like so:</p>
  
  <pre><code> from mapper import where
  </code></pre>
  
  <p>For this one I believe there are ways to use the dot syntax relative <code>import</code>, but again, I would like to keep all my paths absolute. After all, I believe that according to <a href="https://docs.python.org/3.6/tutorial/modules.html#intra-package-references" rel="noreferrer">this</a> passage of python documentation, I should be able to do this:</p>
  
  <blockquote>
    <p>When packages are structured into subpackages (as with the sound package in the example), you can use absolute imports to refer to submodules of siblings packages. For example, if the module <code>sound.filters.vocoder</code> needs to use the echo module in the <code>sound.effects package</code>, it can use from <code>sound.effects import echo</code>.</p>
  </blockquote>
  
  <pre><code>sound/                          Top-level package
        __init__.py               Initialize the sound package
        formats/                  Subpackage for file format conversions
                __init__.py
                wavread.py
                wavwrite.py
                aiffread.py
                aiffwrite.py
                auread.py
                auwrite.py
                ...
       effects/                  Subpackage for sound effects
                __init__.py
                echo.py
                surround.py
                reverse.py
                ...
       filters/                  Subpackage for filters
                __init__.py
                equalizer.py
                vocoder.py
                karaoke.py
                ...
  </code></pre>