title: How to compare requirement file and actually installed Python modules?
body: <p>Given <code>requirements.txt</code> and a virtualenv environment, what is the best way to check <strong>from a script</strong> whether requirements are met and possibly provide details in case of mismatch?</p>
  
  <p>Pip changes it's internal API with major releases, so I seen advices not to use it's <code>parse_requirements</code> method.</p>
  
  <p>There is a way of <code>pkg_resources.require(dependencies)</code>, but then how to parse requirements file with all it's fanciness, like github links, etc.?</p>
  
  <p>This should be something pretty simple, but can't find any pointers.</p>
  
  <p>UPDATE: programmatic solution is needed.</p>