July 2016
Beginner to intermediate
462 pages
9h 14m
English
Virtual environments provide dependency isolation for small projects. They also keep your site-packages directory small. Since Python 3.3, virtualenv has been part of the standard Python distribution. The virtualenvwrapper Python project has some extra convenient features for virtual environment management. I will demonstrate virtualenv and virtualenvwrapper functionality in this recipe.
You need Python 3.3 or later. You can install virtualenvwrapper with pip command as follows:
$ [sudo] pip install virtualenvwrapper
On Linux and Mac, it's necessary to do some extra work—specifying a directory for the virtual environments and sourcing a script:
$ export WORKON_HOME=/tmp/envs ...Read now
Unlock full access