Skip to content

LookupError during pip install with no-binary flag #90

@eyablonowitz

Description

@eyablonowitz

Looks like hatch-semver can't be installed with the --no-binary flag.

% pip install --no-binary :all:  hatch-semver
Collecting hatch-semver
  Using cached hatch_semver-2.0.0.tar.gz (19 kB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 2
  ╰─> [77 lines of output]
      Collecting hatchling
        Using cached hatchling-1.21.1.tar.gz (58 kB)
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Installing backend dependencies: started
        Installing backend dependencies: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'done'
      Collecting hatch-semver
        Using cached hatch_semver-2.0.0.tar.gz (19 kB)
      ERROR: Exception:
      Traceback (most recent call last):
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
          status = run_func(*args)
                   ^^^^^^^^^^^^^^^
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper
          return func(self, options, args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_internal/commands/install.py", line 377, in run
          requirement_set = resolver.resolve(
                            ^^^^^^^^^^^^^^^^^
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 95, in resolve
          result = self._result = resolver.resolve(
                                  ^^^^^^^^^^^^^^^^^
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve
          state = resolution.resolve(requirements, max_rounds=max_rounds)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers.py", line 397, in resolve
          self._add_to_criteria(self.state.criteria, r, parent=None)
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers.py", line 173, in _add_to_criteria
          if not criterion.candidates:
                 ^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_vendor/resolvelib/structs.py", line 156, in __bool__
          return bool(self._sequence)
                 ^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
          return any(self)
                 ^^^^^^^^^
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
          return (c for c in iterator if id(c) not in self._incompatible_ids)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
          candidate = func()
                      ^^^^^^
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 182, in _make_candidate_from_link
          base: Optional[BaseCandidate] = self._make_base_candidate_from_link(
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 228, in _make_base_candidate_from_link
          self._link_candidate_cache[link] = LinkCandidate(
                                             ^^^^^^^^^^^^^^
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 290, in __init__
          super().__init__(
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in __init__
          self.dist = self._prepare()
                      ^^^^^^^^^^^^^^^
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 222, in _prepare
          dist = self._prepare_distribution()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 301, in _prepare_distribution
          return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_internal/operations/prepare.py", line 525, in prepare_linked_requirement
          return self._prepare_linked_requirement(req, parallel_builds)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_internal/operations/prepare.py", line 640, in _prepare_linked_requirement
          dist = _get_prepared_distribution(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_internal/operations/prepare.py", line 70, in _get_prepared_distribution
          with build_tracker.track(req, tracker_id):
        File "/opt/homebrew/Cellar/[email protected]/3.12.2/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py", line 137, in __enter__
          return next(self.gen)
                 ^^^^^^^^^^^^^^
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_internal/operations/build/build_tracker.py", line 137, in track
          self.add(req, tracker_id)
        File "/private/var/folders/rf/q_9xt6gx4217_97_3qdrng5c0000gn/T/tmp.bs9kzeaT/lib/python3.12/site-packages/pip/_internal/operations/build/build_tracker.py", line 103, in add
          raise LookupError(message)
      LookupError: https://files.pythonhosted.org/packages/60/c9/d49df123fa669a175d8ef8ff124b009d9fee8d281b93ce776da0522992c1/hatch_semver-2.0.0.tar.gz (from https://pypi.org/simple/hatch-semver/) (requires-python:>=3.9) is already being built: hatch-semver from https://files.pythonhosted.org/packages/60/c9/d49df123fa669a175d8ef8ff124b009d9fee8d281b93ce776da0522992c1/hatch_semver-2.0.0.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

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 2
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Context - building a package for distribution with Homebrew which always uses the --no-binary flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions