title: Get list of all available pip packages and their versions
body: <p>I am writing a system where I need to get a list of all available packages that can be installed via the pip running on my machine and their default versions. The reason being I need a way to make a production build of my system reproducible, even if someone manually upgraded a single package for pip.</p>
  
  <p>I currently have this one liner to accomplish it, but it doesn't always work cleanly and I'd prefer to steer away from text parsing if at all possible.</p>
  
  <pre><code>$ pip search * | awk '{print $1 $2}' | cut -d ')' -f 1 | awk -F'(' '{print $1"=="$2}'
  </code></pre>
  
  <p>Is there an easy way to do this in pip? It would be nice if there was an equivalent to <code>pip freeze</code> but for all the available packages instead of just what's installed.</p>