This works for me. I’m not using Python’s virtualenv stuff. Yet.
I use the excellent ActivePython distributions for Windows from ActiveState: http://www.activestate.com/activepython.
Install the 2.x and 3.x flavors. You should see a package named ‘pythonselect’. That gives you the pysel command:
C:\>pip list
…
pythonselect (1.3)
…
C:\>where pysel
c:\apps\python3\Scripts\pysel.exe
c:\apps\python2\Scripts\pysel.exe
// which Python are we running? looks like 3.4:
C:\>pysel
* Python 3.4
Python 2.7 (type “pysel 2.7” to set as current)
C:\Users\dwight>python –version
Python 3.4.3
// switch to Python 2.7:
C:\>pysel 2.7
Python 3.4 (type “pysel 3.4” to set as current)
* Python 2.7
// exit the command line shell, and open a new command line shell instance:
C:\>exit
// which Python are we running? looks like 2.7:
C:\>pysel
Python 3.4 (type “pysel 3.4” to set as current)
* Python 2.7
C:\>python –version
Python 2.7.10