0

Could anyone point me to the best way to let Tox find multiple Python interpreters on a Windows system? I am not allowed to modify the tox.ini for my project. The tox.ini file contains:

envlist = py27,py37

I would like tox to be able to find the Python2 and Python3 interpreters. In Linux, I do this by setting multiple local versions of Python with pyenv (pyenv local 3.7.0, 2.7.15) but the Windows version does not appear to support multiple arguments. Does anyone have any ideas on the easiest way to do this for Windows, preferably without messing with my PATH?

Mason3k
  • 151
  • 1
  • 8
  • I didn't know anything about "tox" before a few minutes ago. But with just a few minutes of Googling, it appears that you need to have virtual environments predefined with the names "py27" and "py37"? Do you have those environments defined. You mention "pyenv", so I assume that for the `envlist` line to make sense, you should be able to execute the commands `pyenv local py27` and `pyenv local py37` and have those correctly set the active interpreter appropriately. Can you do that? (I could be totally wrong here, but since nobody's offered you any 34 minutes, I figured I'd give it a shot) – CryptoFool Jan 30 '21 at 02:01
  • ...if what I'm saying isn't quite the answer, it seems to me that there has to be some place that environments with the names `py27` and `py37` are defined. The other possibility is that those names need to be defined in the `tox.ini` file. - Another thing...you don't explain what behavior you're currently getting or what behavior you expect. If nothing I've said so far gives you enough help, maybe you should more clearly describe what you're trying and in what way it isn't working. – CryptoFool Jan 30 '21 at 02:05
  • I do not fully understand the question. Do you have Python 2.7 and 3.7 on your machine or not? – sinoroc Jan 30 '21 at 10:17
  • Does this answer your question? [Set up multiple python installations on windows with tox](https://stackoverflow.com/questions/13834381/set-up-multiple-python-installations-on-windows-with-tox) – User Aug 07 '22 at 22:26

1 Answers1

0

There is also pyenv for Windows

https://github.com/pyenv-win/pyenv-win

Jürgen Gmach
  • 5,366
  • 3
  • 20
  • 37