title: python -m: Error while finding module specification
body: <p>According to the python doc the <code>-m</code> flag should do the following:</p>
  
  <blockquote>
    <p>Search sys.path for the named module and execute its contents as the
    <code>__main__</code> module.</p>
  </blockquote>
  
  <p>When I run my script simply with the <code>python</code> command, everything works fine. Since I now want to import something from a higher level, I have to run the script with <code>python -m</code>. However the <code>__name__ == "__main__"</code> statement seems to return <code>False</code> and the following Error is produced:</p>
  
  <pre><code>/home/&lt;name&gt;/anaconda3/bin/python: Error while finding module specification for 'data.generate_dummies.py' (AttributeError: module 'data.generate_dummies' has no attribute '__path__')
  </code></pre>
  
  <p>I dont't understand what the <code>__path__</code> attribute has to do with that.</p>