Solved

Need Multiple Versions of Python Using Virutalenvwrapper-win and Virtualenv

Posted on 2016-10-06
5
37 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 15

Expert Comment

by:Walter Ritzel
Comment Utility
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
Comment Utility
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 15

Accepted Solution

by:
Walter Ritzel earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks for the help.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now