title: No module found when executing Python program directly or from a Makefile, but works fine when running using "python"
body: <p>I have a python program that uses the ElementTree module. When I run my program using "python" like the following...</p>
  
  <pre><code>python myprogram.py
  </code></pre>
  
  <p>...it works fine. But when I run it from inside a Makefile (same command as above inside the Makefile), it says <strong><em>"ImportError: No module named etree.ElementTree"</em></strong>. I also see the same error when I add "#!/usr/bin/env python" on the first line and try executing the myprogram.py directly. </p>
  
  <p>I am mainly interested in being able to run my program from a Makefile (whether using the "python" command or executing directly doesn't matter as long as I can execute from a Makefile).</p>
  
  <p>I have found 2 thread in SO, namely...</p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/27828319/importerror-no-module-named-when-module-is-there">ImportError: No module named when module is there</a></li>
  <li><a href="https://stackoverflow.com/questions/31385154/makefile-cannot-find-module-in-python3">Makefile cannot find module in Python3</a></li>
  </ol>
  
  <p>...but these 2 thread talk about importing non-standard (ie custom made modules). How do I fix this issue given that I am using standard python modules and given that I want to be able to run from a Makefile?</p>