4

I am very impressed by Comprehensive beginner's virtualenv tutorial? question. I started reading it because, finally, I have decided to use virtualenv.

But I have also found about virtualenvwrapper http://virtualenvwrapper.readthedocs.org/en/latest/, and as I understand it virtualenvwrapper is better.

I did read http://blog.fruiapps.com/2012/06/An-introductory-tutorial-to-python-virtualenv-and-virtualenvwrapper and http://doughellmann.com/2008/05/virtualenvwrapper.html, but from beginner point I still have questions about virtualenvwrapper:

  1. As beginner, who has no experience with virtualenv, should I first start using virtualenv, or to go directly to virtualenvwrapper ?

  2. What is the benefit of virtualenvwrapper ? As far as I understand it is useful when you have many virtual environments.

  3. If I start project with virtualenv, can I later use virtualenvwrapper on it ? Or I need to convert it to virtualenvwrapper, if so how to do conversion ?

  4. What is the benefit of Lazy Loading http://virtualenvwrapper.readthedocs.org/en/latest/install.html#lazy-loading ?

Thanks,

Community
  • 1
  • 1
WebOrCode
  • 6,852
  • 9
  • 43
  • 70
  • Please note that the virtualenv question you linked is more than two and a half years old and wouldn't be considered a good fit for this site anymore (mainly because it is a thinly veiled request for offsite resources; note that the answers basically consist of just a few links and not much information in themselves). Also, your questions 1 and 2 are clearly off-topic (not objectively answerable/too broad), while 3 and 4 might be on-topic when related to a specific problem but aren't in their current form; asking multiple questions is discouraged too. – l4mpi Nov 23 '13 at 14:39

1 Answers1

2

As the name implies, virtualenvwrapper is a wrapper around virtualenv. Whether it's "better" or not depends on your use case, mostly. The main potential issue with virtualenvwrapper is that it stores all your virtualenvs in the same place (which doesn't mean projects using the virtualenv should live in the same place).

As a developper I use virtualenvwrapper on my workstation and greatly benefit from the added features (like tying projects to virtualenvs so a single command both activate the virtualenv and sends me to the project's directory, and that's really only a little part of virtualenwrapper's benefits).

When it comes to deployement, our sysadmin prefers to have each project's virtualenv along the project's directory (which makes sense wrt/ his own constraints, including isolation, permissions, relocatability etc).

wrt/ having "many virtual environments", well, that's the point of virtualenvs anyway: one virtualenv per project so you can sanely manage dependencies, library versions etc.

bruno desthuilliers
  • 75,974
  • 6
  • 88
  • 118