QA/Execution/Web Testing/Automation/Virtual Environments: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Created page with "Virtual environments are isolated Python environments. They allow freedom to install specific versions of dependencies without affecting the global site-packages. They also make ...")
 
No edit summary
Line 15: Line 15:
== Switch to the WebQA virtual environment ==
== Switch to the WebQA virtual environment ==
     workon webqa
     workon webqa
== Install pip on Windows ==

Revision as of 19:07, 26 October 2012

Virtual environments are isolated Python environments. They allow freedom to install specific versions of dependencies without affecting the global site-packages. They also make it easy to throw away a 'broken' environment and start again. If you need further information regarding virtual environments, please see the virtualenvwrapper documentation.

Install virtualenvwrapper

  1. Install virtualenvwrapper:
  2. sudo pip install virtualenvwrapper
  3. Add the following to your ~/.bash_profile:
  4. export WORKON_HOME=$HOME/.virtualenvs source /usr/local/bin/virtualenvwrapper.sh

Create a virtual environment for WebQA

   mkvirtualenv webqa

Switch to the WebQA virtual environment

   workon webqa

Install pip on Windows