Conan导入错误在gitlab管道-无法加载配方



这是在gitlab管道中构建作业期间获得的错误。这在管道构建中最初工作了几天,并且在代码存储库中没有任何更新,导入错误开始发生。如果有人能解释一下就太好了。

柯南版本中的管道流道图像为Conan version 1.51.3

gtest/1.10.0: Not found in local cache, looking in remotes...
gtest/1.10.0: Trying with 'conancenter'...
Downloading conanmanifest.txt
Downloading conanfile.py
Downloading conan_export.tgz
gtest/1.10.0: Downloaded recipe revision 0
ERROR: gtest/1.10.0: Cannot load recipe.
Error loading conanfile at '/root/.conan/data/gtest/1.10.0/_/_/export/conanfile.py': Unable to load conanfile in /root/.conan/data/gtest/1.10.0/_/_/export/conanfile.py
  File "/usr/lib/python3.10/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 719, in _load
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/root/.conan/data/gtest/1.10.0/_/_/export/conanfile.py", line 6, in <module>
    from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, replace_in_file, rm, rmdir
ImportError: cannot import name 'export_conandata_patches' from 'conan.tools.files' (/usr/local/lib/python3.10/dist-packages/conan/tools/files/__init__.py)

期待您的回复。最好的亲爱的

蜂蜜Sukesan

export_conandata_patches自Conan 1.52.0起可用。

你需要更新你的柯南客户端版本:

pip install -U conan

从柯南1.52.0开始,required_conan_version在解析那些导入的模块之前被验证,所以它很快就会失败,首先验证你的柯南客户端版本。

最新更新