Installing pgAdmin4 from server:database:postgresql

I am installing pgAdmin4 on a fresh OpenSUSE Leap 15.0 system.

The pgAdmin4 component in the default DESKTOP mode fails to start with the message “Failed to launch the application server, server thread exiting.”

It is a common problem and the message is not very informative. To investigate it further one has to try starting the application server from the console via

python3 /usr/lib/python3.6/site-packages/pgadmin4-web/pgAdmin4.py

In my case the reason was in missing Python modules. In particular Flask modules that are currently not available neither in the main OpenSUSE repository nor in the server:database:postgresql.

The following had to be installed

sudo zypper in python3-psutil python3-sqlparse
sudo pip install Flask_BabelEx Flask_Mail Flask_Paranoid Flask_Security Flask_SQLAlchemy Flask_Migrate Flask_Gravatar Flask_htmlmin sshtunnel

Probably python3-psutil and python3-sqlparse should be included as dependencies for pgadmin4

I am sorry, but it is not quite clear to me what your question is.

Thank you for the comment. I would summarize the question as “What is the correct way to install pgAdmin4 on OpenSUSE Leap 15.0?

Looks like this package underwent a major upgrade within the past 30 days.
I’m guessing that the spec to automatically install dependencies may be faulty.

Because you installed PgAdmin4 from the openSUSE repositories, you should have installed your dependencies from the openSUSE repositories as well and only if truly unavailable install from the official Python repositories… Here is a link to the Software search for Python Flask modules provided by openSUSE packages

https://software.opensuse.org/search?utf8=✓&baseproject=ALL&q=flask

By installing from the official python repositories, those libraries (primarily Flask modules in your case) won’t be automatically updated by openSUSE commands (YaST or zypper).

I think the reason why the Flask modules may have been missing is that PGAdmin4 can be configured to run either as a Workstation app, or a Server app…
When PGAdmin4 is installed as a Server app, it deploys on a web server with database backend and may not require Flask modules.
If this is true, then I’d think that two PGAdmin packages should be created, for Server mode and Workstation mode.

You can submit a bug report at https://bugzilla.opensuse.org with your finding that Flask modules are missing from the current PGAdmin4 package and let the maintainers make a decision how to modify.

TSU

Thanks for the replies. After adding the Backports repository from Python Modules projects (devel:languages:python:backports) I was able to install pgadmin4. The Flask modules listed above are either specified directly in the pgadmin4 spec file or are second level dependencies as it happens in the case of python3-Flask-BabelEx that it not mentioned explicitly. So there is no bug in pgadmin4 spec to report.

Answering my own question, the correct procedure to install pgadmin4 would be

sudo zypper ar -n devel:languages:python:backports http://download.opensuse.org/repositories/devel:/languages:/python:/backports/openSUSE_Leap_15.0/ experimental-python-backports
sudo zypper in pgadmin4

I would suggest your experience warrants submitting a big report because the backports repository may not be an obvious requirement to obtain the necessary dependencies.

And, as I noted there probably should be two PgAdmin4 installations for server mode and for workstation mode, not just one.

TSU

Submitted bug #1134794