【发布时间】:2021-10-13 18:08:34
【问题描述】:
鉴于以下 tox.ini 文件:
[tox]
envlist = py39
isolated_build = True
requires =
tox-poetry-dev-dependencies
[testenv]
description = Default environment
commands =
python --version
[testenv:mytestenvironment]
commands =
python --version
我期望$ tox -r 和$ tox -r -e mytestenvironment 都产生Python 3.9.7,但是,后面的语句产生Python 3.10.0。我的本地环境,通过$ python3 --version确认默认环境为3.9.7;我相信3.10.0是从brew upgrade引入的(显然是最新的tox,3.24.4需要Python >=3.10.0
问题是:如何修改 tox.ini 以强制使用 Python 3.9?
【问题讨论】:
标签: python continuous-integration tox