how to install python 2 in virtual environment code example Example: virtual env python 2 virtualenv -p C:\Python27\python.exe venv .\venv\Scripts\activate