Solved

Need Multiple Versions of Python Using Virutalenvwrapper-win and Virtualenv

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

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
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 use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

912 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

21 Experts available now in Live!

Get 1:1 Help Now