I have this installed
- on Windows 7
- Python 2.7.6 (my default, with virtualenv installed)
- Python 2.4.4
- Python 2.5.4
- Python 2.6.6
- Python 3.3.3
- virtualenv 1.10.1
I want to test code on all of those python installations.
(Similar quesion Multiple python versions using virtualenv -p (and virtualenvwrapper-win) on Windows does not answer this.)
This is what I tried so far:
Python 2.4 gives a syntax error (creates an environment but with PY27 installed!):
>virtualenv -p c:\apps\Python24\python.exe env24_v
Running virtualenv with interpreter c:\apps\Python24\python.exe
File "C:\apps\Python27\lib\site-packages\virtualenv.py", line 1508
cp_or_ln = (os.symlink if symlink else copyfile)
^
SyntaxError: invalid syntax
Python 2.5 is obviously not supported (no environment created):
C:\Users\martin>virtualenv -p c:\apps\Python25\python.exe env25
Running virtualenv with interpreter c:\apps\Python25\python.exe
ERROR: None
ERROR: this script requires Python 2.6 or greater.
Python 2.6 works as expected:
C:\Users\martin\.virtualenvs>virtualenv -p c:\apps\Python26\python.exe env26
Running virtualenv with interpreter c:\apps\Python26\python.exe
New python executable in env26\Scripts\python.exe
Installing Setuptools..............done.
Installing Pip.............done.
C:\Users\martin\.virtualenvs>env26\Scripts\activate
(env26) C:\Users\martin\.virtualenvs>python
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
Python 2.7 and 3.3 also work as expected.
So my question is: Although the recent virtualenv tool does not support Python 2.4 / 2.5 environments, is there a trick to achieve this?