I am using windows 7. I have installed both python 2.7 and python 3.4 on my pc. And I have also added C:\Python27\;C:\Python27\Scripts\;C:\Python34\;C:\Python34\Scripts\;
in the PATH. When I enter python --version
in cmd it outputs Python 3.4.4
. Now, I want to create virtual env for both 2.7 & 3.4. If I am right, I have to install virtualenv
for python 2.7 but not for 3.4 because it already has. Please explain how should I install & create virtualenv for both.
Asked
Active
Viewed 101 times
0

Deepak
- 3,134
- 2
- 24
- 24
-
If you scroll down that duplicate you will find a Windows solution as well. – idjaw Apr 18 '16 at 12:06
-
ok, but how will i install virtualenv for 2.7 – Deepak Apr 18 '16 at 12:15
-
Everything is in that dupe target. Read through it. You have to specify the exact path of the Python version you want to use. From the duplicate target, look at [this](http://stackoverflow.com/a/6892302/1832539) answer. – idjaw Apr 18 '16 at 12:18
-
I did it and got the error `'virtualenv' is not recognized a operable program or batch file.` – Deepak Apr 18 '16 at 12:38
-
From your question: "If I am right, I have to install virtualenv". Did you do that yet? You might want to start there. – idjaw Apr 18 '16 at 12:41
-
No I haven't. that's the problem i am facing. How to do that? – Deepak Apr 18 '16 at 12:43
-
@martinho have you tried [google](https://www.google.com/webhp?hl=en#hl=en&q=how+to+install+virtualenv+on+windows)? or maybe [how to install virtualenv on multiple versions of python](https://www.google.ca/webhp?hl=en#hl=en&q=how+to+install+virtualenv+on+multiple+versions+of+python) – Tadhg McDonald-Jensen Apr 18 '16 at 13:06
-
I have tried but not getting satisfactory answer. help would be great. – Deepak Apr 18 '16 at 13:12