Python virtual environments
Using virtual environments is absolutely essential to effectively develop software with python. It is used to keep the dependencies required by different projects in separate places and allows you to keep your global site-packages directory clean and manageable. If you are not already working with virtualenvironments, you should install and start using this tool immediately. If you are already using virtualenvironments, but do not yet fully appreciate why they are so essential, you should consult the resources below and learn about some of the more advanced features.
Goals/Objectives/Outcomes
- Understand why using virtual environments is essential to python software development
- Understand the difference between global site packages and virtualenv site packages and where both are located
- Understand how to install virtualenv and virtualenvwrapper, create virtual environments, switch between them and install and manage packages
- Understand how to set user environment variables for virtualenvwrapper
- Understand how to use different python versions and versions of packages across virtualenvs
- Understand how to use specific virtual environments with wsgi inside apache or nginx
Reference Material
- https://docs.python.org/2.7/installing/index.html?highlight=virtualenv
- http://www.simononsoftware.com/virtualenv-tutorial/
- http://www.simononsoftware.com/virtualenv-tutorial-part-2/
- http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
- http://www.saltycrane.com/blog/2009/05/notes-using-pip-and-virtualenv-django/
- http://www.sitepoint.com/virtual-environments-python-made-easy/
- http://www.dabapps.com/blog/introduction-to-pip-and-virtualenv-python/
Measures of Success
- Participant can articulate why using virtual environments is so essential
- Participant is successfully using virtual environments for their python projects
- Participant has successfully deployed a virtualenvironment using a wsgi wrapper inside a web server