【问题标题】:tox does not update dependency in "requires" sectiontox 不会更新“需要”部分中的依赖项
【发布时间】:2020-08-06 14:53:10
【问题描述】:

我有以下 tox.ini 文件:

[tox]
envlist = py36, ...
requires =
    tox-venv
    setuptools==49.2.1 # latest
    ...

[testenv:py36]
deps = ...

运行起来好像没问题:

tox -e py36
py36 installdeps: setuptools==49.2.1, ...

然而 setuptools 没有正确安装(这会导致安装 py36 的 deps 出现问题):

 .tox/py36/bin/pip list
 Package    Version
 ---------- -------
 pip        18.1
 setuptools 40.6.2

运行 venv 本身的相同诊断:

source .tox/py36/bin/activate
python -c "import setuptools; print(setuptools.version.__version__)"
python -c "import setuptools; print (setuptools.__file__)"
40.6.2
.tox/py36/lib/python3.6/site-packages/setuptools/__init__.py

更奇怪的是,我可以“手动”更新它:

.tox/py36/bin/pip install --upgrade setuptools
Collecting setuptools
  Using cached https://files.pythonhosted.org/.../setuptools-49.2.1-py3-none-any.whl
Installing collected packages: setuptools
  Found existing installation: setuptools 40.6.2
    Uninstalling setuptools-40.6.2:
      Successfully uninstalled setuptools-40.6.2
Successfully installed setuptools-49.2.1

我错过了什么吗?我在 Linux 上使用带有 Python 3.6.10 的 tox 3.18.1。 谢谢。

【问题讨论】:

    标签: python setuptools tox


    【解决方案1】:

    好吧,原来是“tox-venv”要求搞砸了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-14
      • 2019-05-28
      • 2020-03-11
      • 2018-03-30
      • 2017-11-10
      • 1970-01-01
      • 2013-06-10
      • 1970-01-01
      相关资源
      最近更新 更多