Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tox can't detect python interpreter in D:\python27 path

My tox.ini file looks like this

[tox]
envlist=py27

[testenv]
deps=
    pytest

This fails to find my base python installation which is at D:\python27 and not the standard c:\python27 location

If I change tox.ini to this, it works but looks ugly.

[tox]
envlist=cpy27,dpy27
skip_missing_interpreters=True
toxworkdir={toxinidir}/build/tox

[testenv]
basepython=
    cpy27: C:\Python27\python.exe
    dpy27: D:\Python27\python.exe

deps=
    pytest

so my question, how can I configure tox so it can figure out where python is installed on the windows machine, w/o explicitly specifying the paths as each developer may have it installed it in a different path on their machine.

like image 721
user330612 Avatar asked Jul 08 '16 16:07

user330612


1 Answers

I figured this out. looks like I need to specify python2.7 instead of py27 for windows

[tox]
envlist=python2.7

This correctly detects the location of python irrespective of C or D drive.

like image 93
user330612 Avatar answered Nov 11 '22 23:11

user330612