Closed pytoxbot closed 7 years ago
Original comment by halwine
This can all be handled in pyenv - you set all needed (multiple) interpreters as active. See pyenv issue 92 for details.
Original comment by @blueyed
tox 1.8 has improvements in this regard (commit 085b6e2), and might raise "Failed to get version_info for ..." in this case instead.
Original comment by @chris-martin
My anecdote, in case anyone else faces the same problem: I saw this error on CircleCI because only one python version is installed by default. Using pyenv to install the other required ones (e.g. pyenv global 3.3.2
) fixed it.
Original comment by simlun
I was also using Python 3.x installed via Homebrew
Original comment by @dwt
If you're asking me, I'm running python 3.x installed via homebrew, so no pyenv.
Original comment by @blueyed
Any chance that you are using pyenv?
I am using pyenv, and the problem is that python3.3
is available (as a shim),
but executing it results in an error:
pyenv: python3.3: command not found
The `python3.3' command exists in these Python versions: 3.3.5
% pyenv shell 3.4.1
% tox -v -e py33-1.7.x
py33-1.7.x create: venv/src/django-taggit/.tox/py33-1.7.x
> /home/user/.pyenv/versions/3.4.1/lib/python3.4/site-packages/tox/_config.py(190)getsupportedinterpreter()
189 import ipdb; ipdb.set_trace()
--> 190 if info.version_info < (2,6):
191 raise tox.exception.UnsupportedInterpreter(
ipdb> l
185 "Jython/Windows does not support installing scripts")
186 info = self.config.interpreters.get_info(self.basepython)
187 if not info.executable:
188 raise tox.exception.InterpreterNotFound(self.basepython)
189 import ipdb; ipdb.set_trace()
--> 190 if info.version_info < (2,6):
191 raise tox.exception.UnsupportedInterpreter(
192 "python2.5 is not supported anymore, sorry")
193 return info.executable
194
195 testenvprefix = "testenv:"
ipdb> info.
info.err info.executable info.name info.out info.runnable info.version_info
ipdb> info.executable
local('/home/user/.pyenv/shims/python3.3')
ipdb> info.version_info
ipdb> info.runnable
False
ipdb> info.out
b''
ipdb> info.err
b"pyenv: python3.3: command not found\n\nThe `python3.3' command exists in these Python versions:\n 3.3.5\n\n"
This then results in the following error, because info.version_info
is None:
/home/user/.pyenv/versions/3.4.1/lib/python3.4/site-packages/tox/_venv.py in getsupportedinterpreter(self)
169
170 def getsupportedinterpreter(self):
--> 171 return self.envconfig.getsupportedinterpreter()
172
173 def create(self, action=None):
/home/user/.pyenv/versions/3.4.1/lib/python3.4/site-packages/tox/_config.py in getsupportedinterpreter(self)
188 raise tox.exception.InterpreterNotFound(self.basepython)
189 import ipdb; ipdb.set_trace()
--> 190 if info.version_info < (2,6):
191 raise tox.exception.UnsupportedInterpreter(
192 "python2.5 is not supported anymore, sorry")
TypeError: unorderable types: NoneType() < tuple()
I could imagine that pytest could also raise InterpreterNotFound
if the
version information is None.
Original comment by simlun
Got the same issue with Python 3.4. It seems to try to use the 2.5 interpreter but crashes. I'm on Mac Mavericks and Python 3.4 was installed via Homebrew. Very weird since it worked yesterday without a problem on 3.4... No clue on what changed today.
$ python --version
Python 2.7.6
$ python3.4 --version
Python 3.4.0
$ tox --version
1.7.1 imported from /usr/local/lib/python2.7/site-packages/tox/__init__.pyc
@dwt (cc: @blueyed) I am looking into the whole issue of interpreter discovery and better pyenv, conda, etc. integration/documentation, so I am sifting through existing issues.
I wonder what happened, since this was last discussed. To me it looks like pyenv works smoothly now with tox, if all needed pyenv installed versions are activated in the shell that tox is invoked from. Is this your current experience as well?
I'm also experiencing this issue, though with python3.6. ERROR: py36: InterpreterNotFound: python3.6
HI @r0fls - I am pretty sure that the original issue (with 3.3) is long resolved. The error message was lying and is fixed also now. So whatever you experienced was a different problem. If the problem persists even if you use the newest version of tox please open a new issue and provide details about how to reproduce the problem. Thanks :)
While trying to create a virtualenv for python 3.3 I'm getting the following error:
What is supposed to happen is this:
My tox file specifies this variable:
So it seems tox is missing to actually hand in that virtualenv variable to the python 3.3 in question.