I am trying to set up tox on windows to run tests against multiple python installations. I have installed each python in folders named, C:\Python\PythonXX_YY
, XX
is the python version (e.g. 27) and YY
is either 32 or 64. Currently, the only python in my PATH is C:\Python\Python33_64
, since I use the new python launcher to run whichever version I want. I am also running tox from this version.
The first problem is that tox doesn't detect these installations, presumably because they are not in the default locations. I can get around this by setting the path in tox.ini for each environment, but it makes the setup very specific to my computer. Is there a better way of letting tox know where my pythons are globally?
The second problem is that, setting the python locations in tox.ini, I get the following error when I run it (for Python27):
Traceback (most recent call last):File "c:\Python\Python33_64\lib\site-packages\virtualenv.py", line 2557, in <module>main()File "c:\Python\Python33_64\lib\site-packages\virtualenv.py", line 961, in mainnever_download=options.never_download)File "c:\Python\Python33_64\lib\site-packages\virtualenv.py", line 1062, in create_environmentsite_packages=site_packages, clear=clear))File "c:\Python\Python33_64\lib\site-packages\virtualenv.py", line 1255, in install_pythoncopy_required_modules(home_dir)File "c:\Python\Python33_64\lib\site-packages\virtualenv.py", line 1193, in copy_required_modulesdst_filename = change_prefix(filename, dst_prefix)File "c:\Python\Python33_64\lib\site-packages\virtualenv.py", line 1164, in change_prefix(filename, prefixes)
AssertionError: Filename c:\Python\Python33_64\lib\site-packages\readline.py does not start with any of these prefixes: ['c:\\python\\python27_64']ERROR: InvocationError: c:\python\python27_64\python.exe c:\Python\Python33_64\lib\site-packages\virtualenv.py --distribute py27 (see C:\Users\david.townshend\Documents\Global\Programming\norman\.tox\py27\log\py27-0.log)
It looks like its trying to install Python2.7 stuff from Python3.3, but I've never really used virtualenv much before so I might be mis-intepreting this error.
I'm not sure what the solution is to this, but it seems to me that the obvious solution should be for tox to use the python launcher to get the python version it needs. Is there a way to make it do this?