tox: fails to run on Windows
Running on Windows 10 (Fall Creators update), Python 3.6.4, and tox 2.9.1, I get three errors:
PS C:\Users\jaraco\m\jaraco.windows> py -m tox
python create: C:\Users\jaraco\m\jaraco.windows\.tox\python
ERROR: invocation failed (exit code 100), logfile: C:\Users\jaraco\m\jaraco.windows\.tox\python\log\python-0.log
ERROR: actionid: python
msg: getenv
cmdargs: ['C:\\Program Files\\Python36\\python.exe', '-m', 'virtualenv', '--python', 'C:\\Program Files\\Python36\\python.exe', 'python']
Already using interpreter C:\Program Files\Python36\python.exe
Using base prefix 'C:\\Program Files\\Python36'
New python executable in C:\Users\jaraco\m\jaraco.windows\.tox\python\Scripts\python.exe
ERROR: The executable C:\Users\jaraco\m\jaraco.windows\.tox\python\Scripts\python.exe is not functioning
ERROR: It thinks sys.prefix is 'c:\\users\\jaraco\\m\\jaraco.windows\\.tox' (should be 'c:\\users\\jaraco\\m\\jaraco.windows\\.tox\\python')
ERROR: virtualenv is not compatible with this system or executable
Note: some Windows users have reported this error when they installed Python for "Only this user" or have multiple versions of Python installed. Copying the appropriate PythonXX.dll to the virtualenv Scripts/ directory may fix this problem.
ERROR: Error creating virtualenv. Note that some special characters (e.g. ':' and unicode symbols) in paths are not supported by virtualenv. Error details: InvocationError('C:\\Program Files\\Python36\\python.exe -m virtualenv --python C:\\Program Files\\Python36\\python.exe python (see C:\\Users\\jaraco\\m\\jaraco.windows\\.tox\\python\\log\\python-0.log)', 100)
______________________________________________________ summary _______________________________________________________
ERROR: python: Error creating virtualenv. Note that some special characters (e.g. ':' and unicode symbols) in paths are not supported by virtualenv. Error details: InvocationError('C:\\Program Files\\Python36\\python.exe -m virtualenv --python C:\\Program Files\\Python36\\python.exe python (see C:\\Users\\jaraco\\m\\jaraco.windows\\.tox\\python\\log\\python-0.log)', 100)
I’ve not installed Python for “Only this user”. I do have one other Python (2.7.14) installed and running py -m tox -e py27 does run successfully.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (4 by maintainers)
Commits related to this issue
- tox-venv for windows See tox-dev/tox#721. — committed to python-jsonschema/jsonschema by Julian 5 years ago
Yeah it’s a virtualenv bug, please mind your language though.
I’m no longer able to replicate the issue reported upstream. I used to install my Windows Pythons in
C:\Program Files\Python37(or similar), but these days I’ve given up on trying to be proper about security and all that and just use Chocolatey to install Python on Windows, which installs it inC:\Python37. I suspect the space in the file path is what is tripping up both Virtualenv and Tox. I suspect that TheFriendlyCoder didn’t experience the issue in virtualenv directly because he was passing the full path to the executable in his call to create the virtualenv.I tried installing Python 3.6 using the python.org installer, which installs to
C:\Program Files\Python36by default, but even in that environment, I’m unable to replicate the issue. Creating virtualenvs with either virtualenv itself or with tox succeeds now without error for me.I’m pretty sure there’s nothing to be done by tox, so closing.