Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need Multiple Versions of Python Using Virutalenvwrapper-win and Virtualenv

Posted on 2016-10-06
5
Medium Priority
?
98 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 2000 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

688 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