Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unable to install python-freeipa #66689

Open
rimskij opened this issue Jul 4, 2024 · 4 comments
Open

[BUG] Unable to install python-freeipa #66689

rimskij opened this issue Jul 4, 2024 · 4 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior

Comments

@rimskij
Copy link

rimskij commented Jul 4, 2024

Description
Cant install python-freeipa (Python Requests library) on minion 3007
https://python-freeipa.readthedocs.io/en/latest/
No problems on 3004-3005 minions
Setup

salt-pip install python-freeipa
Collecting python-freeipa
  Using cached python-freeipa-1.0.8.tar.gz (71 kB)
ERROR: Exception:
Traceback (most recent call last):
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 179, in exc_logging_wrapper
    status = run_func(*args)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/relenv/runtime.py", line 638, in wrapper
    return func(self, options, args)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 67, in wrapper
    return func(self, options, args)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 377, in run
    requirement_set = resolver.resolve(
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 95, in resolve
    result = self._result = resolver.resolve(
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 397, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 173, in _add_to_criteria
    if not criterion.candidates:
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_vendor/resolvelib/structs.py", line 156, in __bool__
    return bool(self._sequence)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 174, in __bool__
    return any(self)
  File "/opt/saltstack/salt/lib/python3.10/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 "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 53, in _iter_built
    candidate = func()
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 185, in _make_candidate_from_link
    base: Optional[BaseCandidate] = self._make_base_candidate_from_link(
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 231, in _make_base_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 303, in __init__
    super().__init__(
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 158, in __init__
    self.dist = self._prepare()
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 235, in _prepare
    dist = self._prepare_distribution()
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 314, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 527, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 642, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 72, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 46, in prepare_distribution_metadata
    self._prepare_build_backend(finder)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 77, in _prepare_build_backend
    self.req.build_env = BuildEnvironment()
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/build_env.py", line 87, in __init__
    self._prefixes = OrderedDict(
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/build_env.py", line 88, in <genexpr>
    (name, _Prefix(os.path.join(temp_dir.path, name)))
  File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_internal/build_env.py", line 40, in __init__
    scheme = get_scheme("", prefix=path)
  File "/opt/saltstack/salt/lib/python3.10/site-packages/relenv/runtime.py", line 673, in wrapper
    scheme.platlib = TARGET.PATH
  File "<string>", line 4, in __setattr__
dataclasses.FrozenInstanceError: cannot assign to field 'platlib'
@rimskij rimskij added Bug broken, incorrect, or confusing behavior needs-triage labels Jul 4, 2024
@sticky-note
Copy link

Faced this issue, Seems to be pip>=24.1 which is broken with salt-pip.
It works fine for me with version that come with salt : pip==23.3.2
You can downgrade quickly with:

/opt/saltstack/salt/bin/python3 -m pip install pip==24.0

@rimskij
Copy link
Author

rimskij commented Jul 5, 2024

Столкнулся с этой проблемой, похоже, что pip>=24.1она сломала с salt-pip. У меня отлично работает версия, которая идет с солью: pip==23.3.2 Вы можете быстро понизить версию с помощью:

/opt/saltstack/salt/bin/python3 -m pip install p

have another problem

salt-pip install python-freeipa
Collecting python-freeipa
  Using cached python-freeipa-1.0.8.tar.gz (71 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [14 lines of output]
      Error in sitecustomize; set PYTHONVERBOSE for traceback:
      AssertionError:
      Fatal Python error: init_import_site: Failed to import the site module
      Python runtime state: initialized
      Traceback (most recent call last):
        File "/opt/saltstack/salt/lib/python3.10/site.py", line 627, in <module>
          main()
        File "/opt/saltstack/salt/lib/python3.10/site.py", line 620, in main
          execsitecustomize()
        File "/opt/saltstack/salt/lib/python3.10/site-packages/relenv/runtime.py", line 969, in wrapper
          import sitecustomize
        File "/tmp/pip-build-env-v48v7u51/site/sitecustomize.py", line 22, in <module>
          assert not path in sys.path
      AssertionError
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

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

[notice] A new release of pip is available: 23.3.2 -> 24.1.1

@rimskij
Copy link
Author

rimskij commented Jul 5, 2024

Столкнулся с этой проблемой, похоже, что pip>=24.1она сломала с salt-pip. У меня отлично работает версия, которая идет с солью: pip==23.3.2 Вы можете быстро понизить версию с помощью:

/opt/saltstack/salt/bin/python3 -m pip install p

have another problem

salt-pip install python-freeipa
Collecting python-freeipa
  Using cached python-freeipa-1.0.8.tar.gz (71 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [14 lines of output]
      Error in sitecustomize; set PYTHONVERBOSE for traceback:
      AssertionError:
      Fatal Python error: init_import_site: Failed to import the site module
      Python runtime state: initialized
      Traceback (most recent call last):
        File "/opt/saltstack/salt/lib/python3.10/site.py", line 627, in <module>
          main()
        File "/opt/saltstack/salt/lib/python3.10/site.py", line 620, in main
          execsitecustomize()
        File "/opt/saltstack/salt/lib/python3.10/site-packages/relenv/runtime.py", line 969, in wrapper
          import sitecustomize
        File "/tmp/pip-build-env-v48v7u51/site/sitecustomize.py", line 22, in <module>
          assert not path in sys.path
      AssertionError
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

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

[notice] A new release of pip is available: 23.3.2 -> 24.1.1

so, it's not a problem with with salt-pip, some bug with lib python-freeipa--1.0.8. i`ll try to repack this lib.
im Successfully installed python-freeipa-1.0.6 (salt-pip install python-freeipa==1.0.6)

@rimskij
Copy link
Author

rimskij commented Jul 5, 2024

sticky-note

thank you very much for your help in solving this problem

@dwoz dwoz removed the needs-triage label Jul 5, 2024
@dwoz dwoz self-assigned this Jul 5, 2024
@dwoz dwoz added this to the Sulfur v3006.9 milestone Jul 5, 2024
@dwoz dwoz changed the title [BUG] [BUG] Unable to install python-freeipa Jul 5, 2024
@dwoz dwoz modified the milestones: Sulfur v3006.9, Sulfur v3006.10 Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior
Projects
None yet
Development

No branches or pull requests

3 participants