Solved

Need Multiple Versions of Python Using Virutalenvwrapper-win and Virtualenv

Posted on 2016-10-06
5
65 Views
Last Modified: 2016-10-07
I have 2 versions of Python installed on my Windows 7 box and now I need to test using each version to see which works the best.  I set up virtualenv and virtualenvwrapper-win following this guide.  
http://timmyreilly.azurewebsites.net/python-pip-virtualenv-installation-on-windows/

Can anyone tell me how to use the non default python in my existing virtualenv.

Using a Mac I am able to do this and have many versions of python I can draw from.

Thanks,
0
Comment
Question by:sharingsunshine
  • 3
  • 2
5 Comments
 
LVL 16

Expert Comment

by:Walter Ritzel
ID: 41832827
In windows, if you are using virtualenv, you should call the activate.bat script, which is located at the Scripts folder inside the virtualenv folder.
Example: if you have a virtualenv called testpy27 on c:\work\venvs
c:\work\venvs\testpy27\Scripts\activate.bat

Open in new window

0
 

Author Comment

by:sharingsunshine
ID: 41832862
Thanks for the reply.  I have called the activate.bat script but I am unclear how this will help me to have multiple versions of python?  It just seem to open up the virtualenv called ff2
0
 
LVL 16

Accepted Solution

by:
Walter Ritzel earned 500 total points
ID: 41833372
Each virtualenv that you create could have a different version of Python, so when a specific virtualenv is activated, you will be running a specific version of it.
0
 

Author Comment

by:sharingsunshine
ID: 41834389
Thanks for the explanation which helped me to look a little deeper on the net to find the proper syntax.  From the same blog as I reference above, I found this explanation.

mkvirtualenv --python=C:\Python35-32\python.exe pythonthreeEnv

‘pythonthreeEnv’ is the name of my environment. 

Open in new window


which can be found at http://timmyreilly.azurewebsites.net/setup-a-virtualenv-for-python-3-on-windows/
0
 

Author Closing Comment

by:sharingsunshine
ID: 41834391
Thanks for the help.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question