Follow below steps to create a virtual environment with python 2.7 version,
you can replace it with any other version. $ pip install virtualenv $ virtualenv -p python2.7 mypython27
Run below command to activate python 2.7 virtualenv > Go to mypython27 directory $ . bin/activate