title: How to share packages between virtual environments using conda or virtualenv?
body: <p>I have multiple python projects, each with its own virtual environment. Additionally I have a global python environment. I want to share the same package files between virtual/global environments without copying them multiple times (where possible).</p>
  
  <pre><code>
  Environment        Packages
  ----------------------------------------
  GLOBAL:      A    B    C    D    
  VENV_1:      A    B    C         E
  VENV_2:                C    D         F
  </code></pre>
  
  <p>So, in this example:</p>
  
  <ul>
  <li>all environments will share the <em>same files</em> for <code>C</code>.</li>
  <li><code>GLOBAL</code> and <code>VENV_1</code> will also share files for <code>A</code> and <code>B</code>.</li>
  <li>And <code>GLOBAL</code> and <code>VENV_2</code> will share files for <code>D</code>.</li>
  <li>But since <code>E</code> and <code>F</code> are not globally installed, then the virtual environments will install those packages individually.</li>
  </ul>
  
  <p>I tried using <code>virtualenv</code> with the <code>--system-site-packages</code> flag, but that just makes <em>all</em> global packages accessible in the virtual environment. So when I export my environment using <code>pip freeze</code> it will contain unnecessary packages.</p>
  
  <p>How can I create a virtual environment with select packages, such that if a package is globally installed, a new copy of files for that package won't be made locally? Is this possible using <code>conda</code> or <code>virtualenv</code> or any other tool?</p>
  
  <p>I am using Windows 10 with python 3.6.</p>