aderlink" href="#listing-packages" title="Permalink to this headline">¶</a></h2>
<p>Using pip</p>
<p>pip list</p>
<p>pip show -f [package name]</p>
<p>From your code</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pkg_resources</span>

<span class="c1"># https://github.com/pypa/pip/issues/5243#issuecomment-381513000</span>
<span class="n">dists</span> <span class="o">=</span> <span class="p">[</span><span class="n">d</sp