venv python 2.7 code example Example 1: python virtual env $ pip install virtualenv Example 2: python virtual env $ cd project_folder $ virtualenv venv