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