create a virtual environment python 2.7 code example Example 1: python virtual env $ pip install virtualenv Example 2: python virtual env $ virtualenv --version