[BUG] Unable to install python-freeipa
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'
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
Столкнулся с этой проблемой, похоже, что
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
Столкнулся с этой проблемой, похоже, что
pip>=24.1она сломала сsalt-pip. У меня отлично работает версия, которая идет с солью:pip==23.3.2Вы можете быстро понизить версию с помощью:/opt/saltstack/salt/bin/python3 -m pip install phave 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)
sticky-note
thank you very much for your help in solving this problem
FYI, no problem on salt-minion 3006.9, Rockylinux 9.
- install as root user.
[root@rocky9t01a pillar]# salt-pip install python-freeipa
Collecting python-freeipa
Downloading python-freeipa-1.0.8.tar.gz (71 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 71.3/71.3 kB 1.9 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: requests in /opt/saltstack/salt/lib/python3.10/site-packages (from python-freeipa) (2.32.3)
Requirement already satisfied: charset-normalizer<4,>=2 in /opt/saltstack/salt/lib/python3.10/site-packages (from requests->python-freeipa) (3.2.0)
Requirement already satisfied: idna<4,>=2.5 in /opt/saltstack/salt/lib/python3.10/site-packages (from requests->python-freeipa) (3.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/saltstack/salt/lib/python3.10/site-packages (from requests->python-freeipa) (1.26.18)
Requirement already satisfied: certifi>=2017.4.17 in /opt/saltstack/salt/lib/python3.10/site-packages (from requests->python-freeipa) (2024.7.4)
Building wheels for collected packages: python-freeipa
Building wheel for python-freeipa (pyproject.toml) ... done
Created wheel for python-freeipa: filename=python_freeipa-1.0.8-py2.py3-none-any.whl size=73156 sha256=7b279e7c00b6fb4af58dd45da987fa9360a43f4dd0c4ffd5766ddfd297c6d6f2
Stored in directory: /root/.cache/pip/wheels/a1/1f/64/763824bfc633179ab6c53b75bc569c222f4329670d761d9257
Successfully built python-freeipa
Installing collected packages: python-freeipa
Successfully installed python-freeipa
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment \
instead: https://pip.pypa.io/warnings/venv
[notice] A new release of pip is available: 23.3.2 -> 24.3.1
[notice] To update, run: pip install --upgrade pip
[root@rocky9t01a pillar]#
- shown as regular user.
[me@rocky9t01a ~]$ salt-pip list |grep ipa
python-freeipa 1.0.8
[me@rocky9t01a ~]$