尝试在 Cygwin 中进行 pip 安装失败:“用户警告:发现未处理的 git 存档(未应用导出子程序)”

问题描述 投票:0回答:1

我正在尝试在运行 Windows 10 的 X86_64 计算机上的 Cygwin 上安装一些 Python 包。

我刚刚更新了我的 Cygwin 发行版,并安装了 python。现在,使用 pip,某些软件包可以正常安装,例如

argparse
,但有些软件包却不能。错误似乎是:

  • UserWarning: git archive did not support describe output
  • UserWarning: unprocessed git archival found (no export subst applied)

请参阅下面的完整跟踪。

为什么会出现这种情况?我该如何解决/规避这个问题?

$ pip install ninja
Collecting ninja
  Using cached ninja-1.11.1.1.tar.gz (132 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: ninja
  Building wheel for ninja (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for ninja (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [13 lines of output]
      /tmp/pip-build-env-8cad4e54/overlay/lib/python3.9/site-packages/setuptools_scm/git.py:312: UserWarning: git archive did not support describe output
        warnings.warn("git archive did not support describe output")
      /tmp/pip-build-env-8cad4e54/overlay/lib/python3.9/site-packages/setuptools_scm/git.py:331: UserWarning: unprocessed git archival found (no export subst applied)
        warnings.warn("unprocessed git archival found (no export subst applied)")
      Traceback (most recent call last):
        File "/tmp/pip-build-env-8cad4e54/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 639, in setup
          cmkr = cmaker.CMaker(cmake_executable)
        File "/tmp/pip-build-env-8cad4e54/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 145, in __init__
          self.cmake_version = get_cmake_version(self.cmake_executable)
        File "/tmp/pip-build-env-8cad4e54/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 102, in get_cmake_version
          raise SKBuildError(msg) from err

      Problem with the CMake installation, aborting build. CMake executable is cmake
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for ninja
Failed to build ninja
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (ninja)

有关我的设置的更多信息:

  • 24.2 点
  • Python 3.9.16
  • 将根据要求提供更多信息...

相关问题:

python pip cygwin package-management git-archive
1个回答
0
投票

您需要安装 Cygwin 软件包

cmake
make
ninja
cmake
本身是不够的;可能仅仅
ninja
就足够了。但他们三个一起就可以了。

感谢@Philippe指出了这条途径。

© www.soinside.com 2019 - 2024. All rights reserved.