Solved

Need Multiple Versions of Python Using Virutalenvwrapper-win and Virtualenv

Posted on 2016-10-06
5
79 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Increase your protection from Zero Day threats!

Running two Antivirus' is never a good idea.
Taking advantage of Multiple Security layers on the other hand can often save your hide.
See which top notch security software brands have been proven to happily coexist together.
Reduce your chances of becoming a statistic.

Question has a verified solution.

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

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 viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

738 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