ERROR: py35: InterpreterNotFound: python3.5 even though python3.5 is installed

ERROR: py35: InterpreterNotFound: python3.5 even though python3.5 is installed

我 运行 我在 CI(bamboo)上构建了 docker

上的 tox

我的tox.ini看起来像这样

[tox]
envlist = py27,py35
[testenv]
deps=-rrequirements.txt
commands=pytest

我是运行这样的测试

tox --recreate -vv -i $myindexserver

在本地测试设置是否有效(在 docker 内)

py27: commands succeeded
py35: commands succeeded
congratulations :)

但是 运行 在 CI 实例上同样的事情失败了

___________________________________ summary_________________________________

py27: commands succeeded
ERROR: py35: InterpreterNotFound: python3.5

里面 docker, 运行 which python3which python3.5 成功

有没有人遇到过类似的问题?

原来我本地使用的 docker 容器版本和 CI 使用的容器版本不同。

我将答案保留在这里,希望其他人发现这个有用,并可能节省我不得不浪费的调试时间。

执行 docker images 查找您在本地使用的标签,并根据 CI.

中的版本 运行 进行检查