title: Using correct python interpreter intelligently
body: <p>In a Makefile, I call my python script using default python which has all my required modules as below</p>
  
  <pre><code>python test.py
  </code></pre>
  
  <p>It used to work but some other packages has added a new python to the system and changed the env PATH during build to use this new python and my Makefile started failing.</p>
  
  <p>I could have hard coded correct python path as below but this is not a solution while distributing the package</p>
  
  <pre><code>/path/to/correct/python test.py
  </code></pre>
  
  <p>Is there a way to intelligently call a python interpreter which has all my modules. May be check all the python interpreters available in the system and test if they have necessary modules and then execute the script with that interpreter</p>