0

I have python 3.6.6 and I can create a virtual environment with this version using virtulaenv ..I have installed python in drive(C) C:\python36 where the OS is installed.How can I install a specific version like python 2.7.16 in the virtual environment.Do I have to install python 2.7.16 manualy or will it download itself?I saw some answers for linux but couldn't get it.I tried

PS C:\Users\Husni\Desktop\dev> virtualenv -p C:/python2.7.16 .

The path C:/python2.7.16 (from --python=C:/python2.7.16) does not exist

Then I tried

PS C:\Users\Husni\Desktop\dev> virtualenv -p python36 .

The path python36 (from --python=python36) does not exist

drac98
  • 1
  • 1
  • 3
    Possible duplicate of [Using VirtualEnv with multiple Python versions on windows](https://stackoverflow.com/questions/22793650/using-virtualenv-with-multiple-python-versions-on-windows) https://stackoverflow.com/questions/44165220/create-windows-python-virtualenv-with-a-specific-version-of-python https://stackoverflow.com/questions/45293436/how-to-specify-python-version-used-to-create-virtual-environment – Chrismon Chin Aug 23 '19 at 14:36
  • Thanks it worked! – drac98 Aug 23 '19 at 15:34

1 Answers1

0

you can't. install python 2 and virtualenv for it and run like "py -2 -m virtualenv venv"

Artem Strogin
  • 176
  • 1
  • 6