从github运行tox时出现“错误:py37:InterpreterNotFound:python3.7”

时间:2020-07-30 19:47:54

标签: github python-3.7 github-actions tox

我在GitHub上有一个带有tox.ini文件的项目:

[tox]
envlist = py3

[testenv]
deps = -rrequirements.txt
commands =
    pytest --doctest-modules

效果很好。但是,当我用“ py37”替换“ py3”时,它失败并显示以下错误:

ERROR:  py37: InterpreterNotFound: python3.7

据我所知,tox应该支持Python 3.7。这是github上的tox特有的问题吗?

1 个答案:

答案 0 :(得分:0)

在 tox.ini 文件中,写入 python3.7 而不是 py37,您会看到它有效。

感谢 Github 用户 glinskyc 在 Github 问题上的 thread

还要确保您使用的是 tox 的最新版本,即 3.23.1