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

2

1 Answer 1

0

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

Sign up to request clarification or add additional context in comments.

2 Comments

How can I install virtualenv to python2?Do I have to add python2 to the PATH?
Thank you.I tried C:\Python27\Scripts\pip.exe install virtualenv and it worked!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.