scikit-build / ninja-python-distributions

This project provides the infrastructure to build Ninja Python wheels.
Apache License 2.0
62 stars 16 forks source link

When I use pip install ninja, something goes wrong #277

Open jsforyu opened 3 days ago

jsforyu commented 3 days ago

I installed ninja in vscode on windows,cmake==3.31.1,what is wrong with this?

Collecting ninja
  Using cached ninja-1.11.1.2.tar.gz (129 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install backend dependencies did not run successfully.
  │ exit code: 2
  ╰─> [75 lines of output]
      Collecting hatch-fancy-pypi-readme>=22.3
        Using cached hatch_fancy_pypi_readme-24.1.0-py3-none-any.whl.metadata (2.0 kB)
      Collecting setuptools-scm
        Using cached setuptools_scm-8.1.0-py3-none-any.whl.metadata (6.6 kB)
      Collecting ninja>=1.5
        Using cached ninja-1.11.1.2.tar.gz (129 kB)
      ERROR: Exception:
      Traceback (most recent call last):
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\cli\base_command.py", line 105, in _run_wrapper
          status = _inner_run()
                   ^^^^^^^^^^^^
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\cli\base_command.py", line 96, in _inner_run
          return self.run(options, args)
                 ^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\cli\req_command.py", line 67, in wrapper
          return func(self, options, args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\commands\install.py", line 379, in run
          requirement_set = resolver.resolve(
                            ^^^^^^^^^^^^^^^^^
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 95, in resolve
          result = self._result = resolver.resolve(
                                  ^^^^^^^^^^^^^^^^^
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_vendor\resolvelib\resolvers.py", line 546, in resolve
          state = resolution.resolve(requirements, max_rounds=max_rounds)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_vendor\resolvelib\resolvers.py", line 397, in resolve
          self._add_to_criteria(self.state.criteria, r, parent=None)
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_vendor\resolvelib\resolvers.py", line 173, in _add_to_criteria
          if not criterion.candidates:
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_vendor\resolvelib\structs.py", line 156, in __bool__
          return bool(self._sequence)
                 ^^^^^^^^^^^^^^^^^^^^
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 174, in __bool__
          return any(self)
                 ^^^^^^^^^
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 162, in <genexpr>
          return (c for c in iterator if id(c) not in self._incompatible_ids)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 53, in _iter_built
          candidate = func()
                      ^^^^^^
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 187, in _make_candidate_from_link
          base: Optional[BaseCandidate] = self._make_base_candidate_from_link(
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 233, in _make_base_candidate_from_link
          self._link_candidate_cache[link] = LinkCandidate(
                                             ^^^^^^^^^^^^^^
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 304, in __init__
          super().__init__(
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 159, in __init__
          self.dist = self._prepare()
                      ^^^^^^^^^^^^^^^
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 236, in _prepare
          dist = self._prepare_distribution()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 315, in _prepare_distribution
          return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\operations\prepare.py", line 527, in prepare_linked_requirement
          return self._prepare_linked_requirement(req, parallel_builds)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\operations\prepare.py", line 642, in _prepare_linked_requirement
          dist = _get_prepared_distribution(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\operations\prepare.py", line 71, in _get_prepared_distribution
          with build_tracker.track(req, tracker_id):
        File "D:\tools\ucrt64\lib\python3.11\contextlib.py", line 137, in __enter__
          return next(self.gen)
                 ^^^^^^^^^^^^^^
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\operations\build\build_tracker.py", line 136, in track
          self.add(req, tracker_id)
        File "D:\work\LaM4Inv\myenv\lib\python3.11\site-packages\pip\_internal\operations\build\build_tracker.py", line 102, in add
          raise LookupError(message)
      LookupError: https://files.pythonhosted.org/packages/b4/49/4f1a79f99f4c3eb5d22f943bba14832923bb44423254d5089d38a9f6da63/ninja-1.11.1.2.tar.gz (from https://pypi.org/simple/ninja/) (requires-python:>=3.7) is already being built: ninja from https://files.pythonhosted.org/packages/b4/49/4f1a79f99f4c3eb5d22f943bba14832923bb44423254d5089d38a9f6da63/ninja-1.11.1.2.tar.gz
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
mayeut commented 2 days ago

This is most likely a duplicate of #274 @jsforyu can you please confirm ?