title: Why use Pythons 'virtualenv' on Linux when one has 'chroot' (and union/overlay filesystems)?
body: <p>First of all let me state that I am a proponent of generic software (in general ;-). I am no expert on Python, but it seems that the 'virtualenv' utility solves pretty much the same problem 'chroot' can help to solve - bootstrapping a directory tree that can be passed as root, thus effectively protecting the real directory tree, if needed.</p>
  
  <p>Since I am no expert in Python as already mentioned, I wonder - what problem can virtualenv solve that chroot cannot? I mean, can't I just set up a nice fake root tree (possibly using union mounting), <code>chroot</code> into it, and do <code>pip install</code> a package I want in my new environment, and then play around within the bounds of my new environment, running python scripts and what not?</p>
  
  <p>Am I missing something here?</p>
  
  <h3>Update:</h3>
  
  <p>Can't one install packages/modules locally in whatever application directory, I mean, without root privileges and subsequently without overwriting or adding files to <code>/usr/lib</code> or <code>/usr/local/lib</code>? It appears that this is what virtualenv does, however I think it has to symlink or otherwise provide a python interpreter for each environment one creates, does it not?</p>