title: Python Relative Import cannot find package
body: <p>I'm sure that this is a pretty simple problem and that I am just missing something incredibly obvious, but the answer to this predicament has eluded me for several hours now.</p>
  
  <p>My project directory structure looks like this:</p>
  
  <pre><code>-PhysicsMaterial
     -Macros
        __init__.py
        Macros.py
     -Modules
        __init__.py
        AvgAccel.py
        AvgVelocity.py
     -UnitTests
        __init__.py
        AvgAccelUnitTest.py
        AvgVelocityUnitTest.py
      __init__.py
  </code></pre>
  
  <p>Criticisms aside on my naming conventions and directory structure here, I cannot seem to be able to use relative imports. I'm attempting to relative import a Module file to be tested in AvgAccelUnitTest.py:</p>
  
  <pre><code>from .Modules import AvgAccel as accel
  </code></pre>
  
  <p>However, I keep getting:</p>
  
  <pre><code>ValueError: Attempted relative import in non-package
  </code></pre>
  
  <p>Since I have all of my <strong>init</strong> files set up throughout my structure, and I also have the top directory added to my PYTHONPATH, I am stumped. Why is python not interpreting the package and importing the file correctly?</p>