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

pgadmin 8.11 and above cannot be installed on AWS #8347

Open
ShaheedHaque opened this issue Jan 9, 2025 · 1 comment
Open

pgadmin 8.11 and above cannot be installed on AWS #8347

ShaheedHaque opened this issue Jan 9, 2025 · 1 comment
Labels

Comments

@ShaheedHaque
Copy link

ShaheedHaque commented Jan 9, 2025

Please note that security bugs or issues should be reported to [email protected].

Describe the bug

As per pypa/pip#13131, attempting to install pgadmin4 8.11 or greater on and AWS Ubuntu instance fails with this exception:

ERROR: Exception:
Traceback (most recent call last):
  File "/home/ubuntu/venv/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 105, in _run_wrapper
...
  File "/home/ubuntu/venv/lib/python3.12/site-packages/pip/_vendor/packaging/specifiers.py", line 28, in _coerce_version
    version = Version(version)
              ^^^^^^^^^^^^^^^^
  File "/home/ubuntu/venv/lib/python3.12/site-packages/pip/_vendor/packaging/version.py", line 202, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
pip._vendor.packaging.version.InvalidVersion: Invalid version: '6.8.0-1014-aws'

To Reproduce

  1. Launch an AWS Ubuntu image. I am using ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-20240827.
  2. Login
  3. pip install --break-system-packages pgadmin4

Expected behavior

The install should succeed.

Error message

$ pip install --break-system-packages pgadmin4
Defaulting to user installation because normal site-packages is not writeable
Collecting pgadmin4
  Using cached pgadmin4-8.14-py3-none-any.whl.metadata (3.1 kB)
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/dist-packages/pip/_internal/cli/base_command.py", line 105, in _run_wrapper
    status = _inner_run()
             ^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_internal/cli/base_command.py", line 96, in _inner_run
    return self.run(options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_internal/cli/req_command.py", line 67, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_internal/commands/install.py", line 379, in run
    requirement_set = resolver.resolve(
                      ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_internal/resolution/resolvelib/resolver.py", line 95, in resolve
    result = self._result = resolver.resolve(
                            ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 397, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "/usr/local/lib/python3.12/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 173, in _add_to_criteria
    if not criterion.candidates:
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_vendor/resolvelib/structs.py", line 156, in __bool__
    return bool(self._sequence)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 174, in __bool__
    return any(self)
           ^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-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 "/usr/local/lib/python3.12/dist-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 53, in _iter_built
    candidate = func()
                ^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_internal/resolution/resolvelib/factory.py", line 187, in _make_candidate_from_link
    base: Optional[BaseCandidate] = self._make_base_candidate_from_link(
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_internal/resolution/resolvelib/factory.py", line 233, in _make_base_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
                                       ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 304, in __init__
    super().__init__(
  File "/usr/local/lib/python3.12/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 159, in __init__
    self.dist = self._prepare()
                ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 248, in _prepare
    self._check_metadata_consistency(dist)
  File "/usr/local/lib/python3.12/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 230, in _check_metadata_consistency
    list(dist.iter_dependencies(list(dist.iter_provided_extras())))
  File "/usr/local/lib/python3.12/dist-packages/pip/_internal/metadata/importlib/_dists.py", line 220, in iter_dependencies
    elif any(req.marker.evaluate(context) for context in contexts):
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_internal/metadata/importlib/_dists.py", line 220, in <genexpr>
    elif any(req.marker.evaluate(context) for context in contexts):
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_vendor/packaging/markers.py", line 325, in evaluate
    return _evaluate_markers(self._markers, current_environment)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_vendor/packaging/markers.py", line 211, in _evaluate_markers
    groups[-1].append(_evaluate_markers(marker, environment))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_vendor/packaging/markers.py", line 225, in _evaluate_markers
    groups[-1].append(_eval_op(lhs_value, op, rhs_value))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_vendor/packaging/markers.py", line 183, in _eval_op
    return spec.contains(lhs, prereleases=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_vendor/packaging/specifiers.py", line 552, in contains
    normalized_item = _coerce_version(item)
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_vendor/packaging/specifiers.py", line 28, in _coerce_version
    version = Version(version)
              ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/pip/_vendor/packaging/version.py", line 202, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
pip._vendor.packaging.version.InvalidVersion: Invalid version: '6.8.0-1014-aws'

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu, any version with an AWS kernel version name of the broken form.
  • Version: Ubuntu version 22 or 24 with an AWS kernel version of '6.8.0-1014-aws'
  • Mode: Desktop or Server
  • Browser (if running in server mode): n/a
  • Package type: Python

Additional context

I believe the proximate cause is the inability of the pip code to have the AWS kernel version string, as per the linked defect. However, the root cause seems to be a "false" dependency introduced in pgadmin4 8.11 since 8.10 installs just fine, and it seems unlikely that pgadmin4 has a "real" dependency on the Linux kernel in use.

@kpinc
Copy link

kpinc commented Jan 11, 2025

Duplicate of issue #7836.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants