virtualenv does not copy standard modules like shutil and urllib2

Posted by Barthelemy on Stack Overflow See other posts from Stack Overflow or by Barthelemy
Published on 2010-03-29T14:15:33Z Indexed on 2010/03/29 15:03 UTC
Read the original article Hit count: 415

Filed under:
|

When I create a new virtualenv, virtualenv .virtualenvs/my_env, there is only a subset of the standard python modules copied/linked to the new virtualenv.

For example, when I do ls -l in .virtualenvs/my_env/lib/python2.6, I see:

...
... os.py -> /usr/lib/python2.6/os.py
... os.pyc -> /usr/lib/python2.6/os.pyc

but modules like shutil and urllib2 are not copied even if they are in /usr/lib/python2.6/shutil.py. I am using Ubuntu 9.10.

Is this the expected behavior? How can I install modules such as shutil in a virtualenv (I could not find these modules on pypi)?

© Stack Overflow or respective owner

Related posts about virtualenv

Related posts about python