When you have multiple version of Python installed on a Windows PC, you can use the specific Python.exe files to control which version you're working with
PS C:\> .\Python27\python.exe --version
Python 2.7.9
PS C:\> .\Python37\python.exe --version
Python 3.7.7
The same rule applies for pip
PS C:\> .\Python27\Scripts\pip.exe --version
pip 20.2.4 from C:\Python27\lib\site-packages\pip (python 2.7)
PS C:\> .\Python37\Scripts\pip.exe --version
pip 20.2.4 from c:\python37\lib\site-packages\pip (python 3.7)
You need to ensure that you've installed virtualenv using the Python 2.7 version of pip, and verify it's using the correct python version by checking the path
PS C:\> .\Python27\Scripts\pip.exe install virtualenv
PS C:\> .\Python27\Scripts\virtualenv.exe --version
virtualenv 20.1.0 from c:\python27\lib\site-packages\virtualenv\__init__.pyc
I have a Python 3.7 version installed as well for this demonstration
PS C:\> .\Python37\Scripts\virtualenv.exe --version
virtualenv 20.1.0 from c:\python37\lib\site-packages\virtualenv\__init__.py
Then create your virtual environment using the version that you want, activate it and it should be the version of Python you want
PS C:\> .\Python27\Scripts\virtualenv.exe py2env
PS C:\> .\py2env\Scripts\activate
(py2env) PS C:\> python
Python 2.7.9 (default, Dec 10 2014, 12:28:03) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
And finally, the Python 3.7 example
PS C:\> .\Python37\Scripts\virtualenv.exe py3env
PS C:\> .\py3env\Scripts\activate
(py3env) PS C:\> python
Python 3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.