Tox: Tox should fail with InterpreterNotFound: python3.7 when py37

Created on 10 Mar 2017  路  7Comments  路  Source: tox-dev/tox

Enhancement:

Tox currently supports passing env names like tox -e py34 and use the according Python version (here Python 3.4). However it does not recognize py37. This is not really a problem since Python 3.7 has not been released yet (still in dev), but the problem is that tox uses then Python 3.5 instead.

Example:

$ tox -e py37
GLOB sdist-make: /media/pawantu/Data/git/archan/setup.py
py37 create: /media/pawantu/Data/git/archan/.tox/py37
py37 installdeps: ...
py37 runtests: commands[0] | pytest --cov --cov-report=term-missing -vv tests
============= test session starts ================
platform linux -- Python 3.5.2, pytest-3.0.6, py-1.4.32, pluggy-0.4.0 -- /media/pawantu/Data/git/archan/.tox/py37/bin/python3
...

Instead of using Python 3.5 it should fail with InterpreterNotFound: python3.7, similar as for previous Python versions:

$ tox -e py34
GLOB sdist-make: /media/pawantu/Data/git/archan/setup.py
py34 create: /media/pawantu/Data/git/archan/.tox/py34
ERROR: InterpreterNotFound: python3.4
_______________ summary _______________
SKIPPED:  py34: InterpreterNotFound: python3.4
  congratulations :)

Most helpful comment

For anyone still experiencing this, I had this problem today with tox 2.3.1, the version available as a package in Ubuntu 16.04. Installing the current version from pip fixed it.

All 7 comments

@Pawamoy thanks that's interesting and I would say this a bug.

I actually couldn't replicate that:

$ tox -e py37
GLOB sdist-make: /Users/pawelad/Dev/Code/Forks/tox/setup.py
py37 create: /Users/pawelad/Dev/Code/Forks/tox/.tox/py37
ERROR: InterpreterNotFound: python3.7
____________________________________________________________________________________________ summary ____________________________________________________________________________________________
ERROR:   py37: InterpreterNotFound: python3.7

I'm using OS X with pyenv, which could be related but dunno.

@Pawamoy would you mind pasting contents of tox.ini that you used when you encountered this bug?

True. I can't reproduce it either, with or without pyenv.

Oh :open_mouth: Just tried again today and indeed its working as expected. It might have been a problem with already created virtualenvs... I cannot reproduce it anymore, so feel free to close this issue (I will close it myself in a few days if no more comments on this).

@Pawamoy thanks was definitely a gltich then. Closing :)

For anyone still experiencing this, I had this problem today with tox 2.3.1, the version available as a package in Ubuntu 16.04. Installing the current version from pip fixed it.

I experienced this issues and can solve it by reinstall python from manually download ( https://www.python.org/downloads/mac-osx/ ) then try tox again.

tox: version 20.3.1
OS: macOSX

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pytoxbot picture pytoxbot  路  5Comments

pytoxbot picture pytoxbot  路  5Comments

ssbarnea picture ssbarnea  路  4Comments

ssbarnea picture ssbarnea  路  5Comments

obestwalter picture obestwalter  路  3Comments