Skip to content

Installation error with Python3.9 #9829

@Sabo-kun

Description

@Sabo-kun

Describe the bug

If I create a brand new venv in a system with Python3.9 installed (RHEL-based OS), I get the following error on the first pgadmin4 run:
ModuleNotFoundError: No module named 'pkg_resources'
If I manually downgrade setuptools<82.0.0 after pgadmin4 installation, I am able to run the software (even though an error is raised during the downgrade because the pgadmin4 requirements are not satisfied).

The latest version which I can run withouth issues is the 9.12

To Reproduce

To reproduce the issue, use a system with the following python3 version installed:

$ python3 --version
Python 3.9.25

And then execute the following

python3 -m venv venv
source venv/bin/activate
pip install pgadmin4
pgadmin4

Expected behavior

The server should run as expected without manually fixing the dependencies. Instead, an exception is raised

Error message

(venv) $ pgadmin4
Traceback (most recent call last):
  File "/home/xxx/venv/bin/pgadmin4", line 5, in <module>
    from pgadmin4.pgAdmin4 import main
  File "/home/xxx/venv/lib64/python3.9/site-packages/pgadmin4/pgAdmin4.py", line 38, in <module>
    import config
  File "/home/xxx/venv/lib/python3.9/site-packages/pgadmin4/config.py", line 33, in <module>
    from pgadmin.utils import env, IS_WIN, fs_short_path
  File "/home/xxx/venv/lib/python3.9/site-packages/pgadmin4/pgadmin/__init__.py", line 32, in <module>
    from flask_security import Security, SQLAlchemyUserDatastore, current_user
  File "/home/xxx/venv/lib64/python3.9/site-packages/flask_security/__init__.py", line 15, in <module>
    from .core import (
  File "/home/xxx/venv/lib64/python3.9/site-packages/flask_security/core.py", line 86, in <module>
    from .totp import Totp
  File "/home/xxx/venv/lib64/python3.9/site-packages/flask_security/totp.py", line 18, in <module>
    from passlib.pwd import genword
  File "/home/xxx/venv/lib64/python3.9/site-packages/passlib/pwd.py", line 16, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

Desktop (please complete the following information):

  • OS: Oracle Linux 9
  • pgAdmin version: 9.14
  • Mode: Server
  • Browser (if running in server mode): N/A
  • Package type: Pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions