Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 2.7 不包括特定的Python依赖项_Python 2.7_Pants - Fatal编程技术网

Python 2.7 不包括特定的Python依赖项

Python 2.7 不包括特定的Python依赖项,python-2.7,pants,Python 2.7,Pants,目前,我正在使用pants构建和测试我们的python2.7包。在pytests目标完成后的运行目标期间,我们开始注意到以下错误。我尝试添加constraints.txt文件以排除它所抱怨的依赖项,但错误不会停止。有没有办法在构建步骤中排除这些依赖项 ./pants test.pytest --coverage=auto tests/python/abcd/test/xyz [pytest] [cache] No cached artifacts for 1 target. Invalid

目前,我正在使用pants构建和测试我们的python2.7包。在pytests目标完成后的运行目标期间,我们开始注意到以下错误。我尝试添加constraints.txt文件以排除它所抱怨的依赖项,但错误不会停止。有没有办法在构建步骤中排除这些依赖项

./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

你能试着用以下方法来增加长篇大论吗

PEX_VERBOSE=9 ./pants test.pytest --coverage=auto tests/python/abcd/test/xyz
然后在这里回应


此错误可能由以下几方面引起。您是否在构建PEX的同一操作系统上执行PEX?在
构建
文件中的
python_binary
函数中是否也包含
platforms=[…]

这里是PEX社区报告的问题,有详细的堆栈跟踪-,不幸的是,PEX verbose超过了start-ackoverflow限制,而且错误发生在pytest期间,而不是在python binary中。我尝试了中介绍的方法,但没有帮助您的
.pants
文件是否已更改?此错误是在本地还是在其他操作系统上的CI中发生的?未对ini文件进行任何更改。我们没有添加任何新的依赖项。它突然开始破裂。这在MacOS和Linux环境中都会发生