Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does a virtualenv environment contain argparse, distribute and wsgiref? [duplicate]

I am using virtualenv version 1.7.1.2 with python 2.7.3 to create virtual python ennvironments. But when I create such an environment and activate it, I can see the following packages are installed (using pip freeze):

argparse==1.2.1
distribute==0.6.24
wsgiref==0.1.2

Why is that? What does that mean?

like image 435
Alex Avatar asked Apr 22 '13 05:04

Alex


1 Answers

These are the standard packages, and will always follow with that version of Python and Virtualenv.

  • distribute is pretty self-explainatory. It's necessary for pip. Distribute also contains setuptools, but inside the package so not recognized with pip freeze. For more information about what it actually does check out your env/lib/python2.7/site-packages/distribute-0.6.31-py2.7.egg.

  • wsgiref is actually a part of the standard library, but isn't recognized as so. There's a bug report on it, and it's fixed in Python 3.3+. Read more about it in Why does pip freeze report some packages in a fresh virtualenv created with --no-site-packages?

I can't find out why argparse is there though, but my guess is because it's a dependency or something like wsgiref. Finding package dependencies in Python can be a bit hacky/painful though, especially if it's already installed in your virtualenv.

like image 134
timss Avatar answered Sep 30 '22 23:09

timss