目前,我正在使用pants构建和测试我们的python2.7包。在pytest目标完成后,我们开始注意到在运行目标时出现了以下错误。我尝试添加constraints.txt文件以排除其抱怨的依赖项,但错误不会停止。有没有办法在pants构建步骤中排除这些依赖关系?
./pants test.pytest --coverage=auto tests/python/abcd/test/xyz
[pytest]
[cache]
No cached artifacts for 1 target.
Invalidated 1 target.
[run]
Failed to execute PEX file, missing compatible dependencies for:
importlib-metadata
zipp
No .coverage file was found! Skipping coverage reporting.
tests/python/abcd/test/xyz ..... SUCCESS
FAILURE发布于 2020-02-12 21:51:43
您是否可以尝试使用以下命令增加详细程度:
PEX_VERBOSE=9 ./pants test.pytest --coverage=auto tests/python/abcd/test/xyz然后在这里回应?
这个错误可能是由几件事引起的。您是否在构建PEX的同一操作系统上执行PEX?您是否也在BUILD文件的python_binary函数中包含platforms=[...]?
https://stackoverflow.com/questions/59994436
复制相似问题