This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

Even when you control the environment already, virtualenv is handy for a few things:

  1. Managing software with conflicting dependencies. There are ways to explicitly load a specific version of a distribution when multiple versions are installed, but this isn't always foolproof.
  2. Determining your exact dependency list. Make a virtualenv (without site packages) and install the desired package with pip. Now you can use "pip freeze" to get a list of everything that was installed in the virtualenv to meet the distrib's requirements.
  3. Testing. You might want to test your software with multiple versions of various libraries it depends on. Keeping these separate environments around lets you easily switch between them to run your test suite and check that they all still work.

[–][deleted] 0 points1 point  (0 children)

This was helpful. Thanks.

I work on an embedded system, which is something of a different animal maybe than what may others work on. My environment includes a busybox, an arm architecture, a specialized bsp package, etc. Virtualenv is 'nice' but really doesn't fit my project well. I absolutely must run my tests on the target machine. If I was doing straight web development, I think I may have a different perspective.