Python 为什么tox面临Pytest版本冲突?
我想寻求帮助,因为非常相似的问题的答案不能帮助我解决这个问题 tox在我的本地环境中运行时没有错误,但在tox、pytest等的相同版本中,它会引发以下异常:Python 为什么tox面临Pytest版本冲突?,python,travis-ci,pytest,tox,Python,Travis Ci,Pytest,Tox,我想寻求帮助,因为非常相似的问题的答案不能帮助我解决这个问题 tox在我的本地环境中运行时没有错误,但在tox、pytest等的相同版本中,它会引发以下异常: pluggy.manager.PluginValidationError: Plugin 'removestalebytecode' could not be loaded: (pytest 4.4.0 (XXX/.tox/py35/lib/python3.5/site-packages), Requirement.parse('pyte
pluggy.manager.PluginValidationError: Plugin 'removestalebytecode' could not be loaded: (pytest 4.4.0 (XXX/.tox/py35/lib/python3.5/site-packages), Requirement.parse('pytest<3.10'))!
pytest 4.4.0从何而来?
pytest-版本3.7.4,由pip安装'pytest~=3.7.0'显式安装-强制重新安装
pytest 4.4.0从何而来
tox完全独立于pip安装'pytest~=3.7.0'-强制重新安装进行安装
它可以通过将tox环境粘贴到tox.ini中的特定pytest版本来解决
没有答案是不可能回答的。不知道您的系统上具体有什么,也不知道您正在运行什么:py35 installed:pytest==4.4.0 Tox创建一个独立于系统的Python安装,该安装符合Tox.ini。如中所述,Tox和pytest等于不显式安装pytest。我的猜测是,这会导致新环境和现有环境中出现不同的版本。但是pip install'pytest~=3.7.0'-force reinstall是感谢该指令的最后一个安装语句。但我需要移动pytest
[py]
deps=
pytest<3.10
...
pluggy.manager.PluginValidationError: Plugin 'removestalebytecode' could not be loaded: (pytest 4.4.0 (XXX/.tox/py35/lib/python3.5/site-packages), Requirement.parse('pytest<3.10'))!
[py]
deps=
...
pytest-remove-stale-bytecode<3.0.1