Error running pgadmin4 after installing package via apt

From: Sabela <sabela85(at)gmail(dot)com>
To: pgsql-pkg-debian(at)postgresql(dot)org
Subject: Error running pgadmin4 after installing package via apt
Date: 2018-01-31 13:43:51
Message-ID: CAD26WTy+oyRb0qJYJ9rYdRuF1kjcJxEpKBH5PyxAdEgAOESGiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-debian

Hi,

I found there is a packaged version of pgadmin4 available for Debian OS:
https://www.pgadmin.org/download/pgadmin-4-apt/

But I couldn't find any installation guide so what I tried was:

> apt-get install pgadmin4

It worked fine but when I run pgadmin4 it failed:

> pgadmin4
Python path: ""
Python Home: ""
Webapp path: "/usr/share/pgadmin4/web/pgAdmin4.py"
Traceback (most recent call last):
File "/usr/share/pgadmin4/web/pgAdmin4.py", line 34, in <module>
import config
File "/usr/share/pgadmin4/web/config.py", line 30, in <module>
from pgadmin.utils import env, IS_PY2, IS_WIN, fs_short_path
File "/usr/share/pgadmin4/web/pgadmin/__init__.py", line 17, in <module>
from flask import Flask, abort, request, current_app, session, url_for
ImportError: No module named 'flask'

Segmentation fault (core dumped)

I guess something is missing or some configuration is required but I
couldn't find anything about it.

I tried to fix it by setting the PYTHONPATH property but it didn't work
either (although the error changed):

> export PYTHONPATH=~/apps/pgadmin4/venv/lib/python2.7/site-packages/
> pgadmin4
Python path: ""
Python Home: ""
Webapp path: "/usr/share/pgadmin4/web/pgAdmin4.py"
Traceback (most recent call last):
File "/usr/share/pgadmin4/web/pgAdmin4.py", line 67, in <module>
app = create_app()
File "/usr/share/pgadmin4/web/pgadmin/__init__.py", line 357, in
create_app
driver.init_app(app)
File "/usr/share/pgadmin4/web/pgadmin/utils/driver/__init__.py", line 40,
in init_app
DriverRegistry.load_drivers()
File "/usr/share/pgadmin4/web/pgadmin/utils/driver/registry.py", line 88,
in load_drivers
module = import_module(module_name)
File "/usr/lib/python3.5/importlib/__init__.py", line 126, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 665, in exec_module
File "<frozen importlib._bootstrap>", line 222, in
_call_with_frames_removed
File "/usr/share/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
line 23, in <module>
import psycopg2
File
"/home/sabela/apps/pgadmin4/venv/lib/python2.7/site-packages/psycopg2/__init__.py",
line 50, in <module>
from psycopg2._psycopg import ( # noqa
ImportError:
/home/sabela/apps/pgadmin4/venv/lib/python2.7/site-packages/psycopg2/_psycopg.so:
undefined symbol: PyUnicodeUCS4_DecodeUTF8

Segmentation fault (core dumped)

In both cases, a popup with the pgAdmin logo is shown and, after a while, a
new popup with the message "The application server could not be contacted"
appears.

Could you please help me to solve this or point me to the right resource?

Many thanks!

Sabela

Responses

Browse pgsql-pkg-debian by date

  From Date Subject
Next Message Dave Page 2018-01-31 13:52:35 Re: Fwd: pgAdmin4 2.1 on apt.postgresql.org
Previous Message Christoph Berg 2018-01-31 11:48:38 Re: Fwd: pgAdmin4 2.1 on apt.postgresql.org