What is virtualenv?¶
virtualenv is a tool that creates “new” Python installations that are copies of your installed Python. These “virtual environments” are clean and consistent.
Why do I need virtualenv?¶
To keep work areas clean and consistent, and minimize assumptions about what tools are installed where. This makes it easier to have repeatable, consistent builds.
$ pip install virtualenv
Verify It Works!¶
# assume you have created a directory D and moved to it! $ virtualenv --no-site-packages testenv $ . testenv/bin/activate # windows -> . testenv\Scripts\activate.bat # your prompt should change to say (testenv) $ deactivate # remove the testenv directory rm -rf testenv