Thread: pgAdmin4 on Kubuntu Hirsute
Hi all, I've just installed the latest Kubuntu (21.04 Hirsute) onto a new laptop, and I can't get pgAdmin4 5.2 to start. I know that Hirsute isn't supported (yet), but I'd appreciate a pointer or two if possible. I added the apt repo for Groovy (as there's none for Hirsute) to my /etc/apt/sources.list.d, and did: sudo apt update sudo apt install pgadmin4-server All seemed to go OK with the installation. On trying to start it, I get the "Waiting for pgAdmin 4 to start..." dialog, which eventually times out with "The pgAdmin4 server could not be contacted". The runtime environment info given in the error dialog is appended below. I have the python-is-python3 package installed, which maps the "python" command to python3. The python version installed is 3.9.4. The pgadmin4-desktop and pgadmin4-server packages are installed I could run pgAdmin from a docker image; but then (I presume?) I'd have to access it from a browser window... I will if I have to, but I'd prefer to use the self-contained application window. Thanks in advance for any pointers. Ray. pgAdmin Runtime Environment -------------------------------------------------------- Python Path: "/usr/pgadmin4/venv/bin/python3" Runtime Config File: "/home/rod/.config/pgadmin/runtime_config.json" pgAdmin Config File: "/usr/pgadmin4/web/config.py" Webapp Path: "/usr/pgadmin4/web/pgAdmin4.py" pgAdmin Command: "/usr/pgadmin4/venv/bin/python3 -s /usr/pgadmin4/web/pgAdmin4.py" Environment: - LANGUAGE: en_IE:en - USER: rod - PAM_KWALLET5_LOGIN: /run/user/1000/kwallet5.socket - XDG_SEAT: seat0 - XDG_SESSION_TYPE: x11 - SSH_AGENT_PID: 1153 - SHLVL: 0 - HOME: /home/rod - DESKTOP_SESSION: plasma - XDG_SEAT_PATH: /org/freedesktop/DisplayManager/Seat0 - DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/1000/bus - LOGNAME: rod - XDG_SESSION_CLASS: user - XDG_SESSION_ID: 3 - PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin - XDG_SESSION_PATH: /org/freedesktop/DisplayManager/Session1 - XDG_RUNTIME_DIR: /run/user/1000 - DISPLAY: :0 - LANG: en_IE.UTF-8 - XDG_CURRENT_DESKTOP: KDE - XDG_SESSION_DESKTOP: KDE - XAUTHORITY: /home/rod/.Xauthority - SSH_AUTH_SOCK: /tmp/ssh-HDY6xIceY9TG/agent.1039 - SHELL: /bin/bash - QT_ACCESSIBILITY: 1 - GPG_AGENT_INFO: /run/user/1000/gnupg/S.gpg-agent:0:1 - XDG_VTNR: 1 - PWD: /home/rod - XDG_CONFIG_DIRS: /etc/xdg/xdg-plasma:/etc/xdg:/usr/share/kubuntu-default-settings/kf5-settings - XDG_DATA_DIRS: /usr/share/plasma:/usr/local/share:/usr/share:/var/lib/snapd/desktop - XCURSOR_THEME: breeze_cursors - XCURSOR_SIZE: 24 - QT_AUTO_SCREEN_SCALE_FACTOR: 0 - KDE_FULL_SESSION: true - KDE_SESSION_VERSION: 5 - KDE_SESSION_UID: 1000 - KDE_APPLICATIONS_AS_SCOPE: 1 - GTK_RC_FILES: /etc/gtk/gtkrc:/home/rod/.gtkrc:/home/rod/.config/gtkrc - GTK2_RC_FILES: /etc/gtk-2.0/gtkrc:/home/rod/.gtkrc-2.0:/home/rod/.config/gtkrc-2.0 - SESSION_MANAGER: local/novaray:@/tmp/.ICE-unix/1316,unix/novaray:/tmp/.ICE-unix/1316 - GDK_BACKEND: x11 - NO_AT_BRIDGE: 1 - PGADMIN_INT_PORT: 45797 - PGADMIN_INT_KEY: caf0f743-c156-4960-80a0-ff395dee49b4 - PGADMIN_SERVER_MODE: OFF -------------------------------------------------------- Failed to launch pgAdmin4. Error: Error: spawn /usr/pgadmin4/venv/bin/python3 ENOENT -- Raymond O'Donnell // Galway // Ireland ray@rodonnell.ie
Hi Ray
I would suggest activating the virtual environment "source /usr/pgadmin4/venv/bin/activate" and then try to run "/usr/pgadmin4/venv/bin/python3 -s
/usr/pgadmin4/web/pgAdmin4.py" and check whether it works or the same error.
/usr/pgadmin4/web/pgAdmin4.py" and check whether it works or the same error.
On Sat, May 1, 2021 at 10:25 PM Ray O'Donnell <ray@rodonnell.ie> wrote:
Hi all,
I've just installed the latest Kubuntu (21.04 Hirsute) onto a new
laptop, and I can't get pgAdmin4 5.2 to start. I know that Hirsute isn't
supported (yet), but I'd appreciate a pointer or two if possible.
I added the apt repo for Groovy (as there's none for Hirsute) to my
/etc/apt/sources.list.d, and did:
sudo apt update
sudo apt install pgadmin4-server
All seemed to go OK with the installation. On trying to start it, I get
the "Waiting for pgAdmin 4 to start..." dialog, which eventually times
out with "The pgAdmin4 server could not be contacted". The runtime
environment info given in the error dialog is appended below.
I have the python-is-python3 package installed, which maps the "python"
command to python3. The python version installed is 3.9.4. The
pgadmin4-desktop and pgadmin4-server packages are installed
I could run pgAdmin from a docker image; but then (I presume?) I'd have
to access it from a browser window... I will if I have to, but I'd
prefer to use the self-contained application window.
Thanks in advance for any pointers.
Ray.
pgAdmin Runtime Environment
--------------------------------------------------------
Python Path: "/usr/pgadmin4/venv/bin/python3"
Runtime Config File: "/home/rod/.config/pgadmin/runtime_config.json"
pgAdmin Config File: "/usr/pgadmin4/web/config.py"
Webapp Path: "/usr/pgadmin4/web/pgAdmin4.py"
pgAdmin Command: "/usr/pgadmin4/venv/bin/python3 -s
/usr/pgadmin4/web/pgAdmin4.py"
Environment:
- LANGUAGE: en_IE:en
- USER: rod
- PAM_KWALLET5_LOGIN: /run/user/1000/kwallet5.socket
- XDG_SEAT: seat0
- XDG_SESSION_TYPE: x11
- SSH_AGENT_PID: 1153
- SHLVL: 0
- HOME: /home/rod
- DESKTOP_SESSION: plasma
- XDG_SEAT_PATH: /org/freedesktop/DisplayManager/Seat0
- DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/1000/bus
- LOGNAME: rod
- XDG_SESSION_CLASS: user
- XDG_SESSION_ID: 3
- PATH:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
- XDG_SESSION_PATH: /org/freedesktop/DisplayManager/Session1
- XDG_RUNTIME_DIR: /run/user/1000
- DISPLAY: :0
- LANG: en_IE.UTF-8
- XDG_CURRENT_DESKTOP: KDE
- XDG_SESSION_DESKTOP: KDE
- XAUTHORITY: /home/rod/.Xauthority
- SSH_AUTH_SOCK: /tmp/ssh-HDY6xIceY9TG/agent.1039
- SHELL: /bin/bash
- QT_ACCESSIBILITY: 1
- GPG_AGENT_INFO: /run/user/1000/gnupg/S.gpg-agent:0:1
- XDG_VTNR: 1
- PWD: /home/rod
- XDG_CONFIG_DIRS:
/etc/xdg/xdg-plasma:/etc/xdg:/usr/share/kubuntu-default-settings/kf5-settings
- XDG_DATA_DIRS:
/usr/share/plasma:/usr/local/share:/usr/share:/var/lib/snapd/desktop
- XCURSOR_THEME: breeze_cursors
- XCURSOR_SIZE: 24
- QT_AUTO_SCREEN_SCALE_FACTOR: 0
- KDE_FULL_SESSION: true
- KDE_SESSION_VERSION: 5
- KDE_SESSION_UID: 1000
- KDE_APPLICATIONS_AS_SCOPE: 1
- GTK_RC_FILES: /etc/gtk/gtkrc:/home/rod/.gtkrc:/home/rod/.config/gtkrc
- GTK2_RC_FILES:
/etc/gtk-2.0/gtkrc:/home/rod/.gtkrc-2.0:/home/rod/.config/gtkrc-2.0
- SESSION_MANAGER:
local/novaray:@/tmp/.ICE-unix/1316,unix/novaray:/tmp/.ICE-unix/1316
- GDK_BACKEND: x11
- NO_AT_BRIDGE: 1
- PGADMIN_INT_PORT: 45797
- PGADMIN_INT_KEY: caf0f743-c156-4960-80a0-ff395dee49b4
- PGADMIN_SERVER_MODE: OFF
--------------------------------------------------------
Failed to launch pgAdmin4. Error:
Error: spawn /usr/pgadmin4/venv/bin/python3 ENOENT
--
Raymond O'Donnell // Galway // Ireland
ray@rodonnell.ie
Thanks & Regards
Akshay Joshi
pgAdmin Hacker | Principal Software Architect
EDB PostgresMobile: +91 976-788-8246
On 03/05/2021 07:17, Akshay Joshi wrote: > I would suggest activating the virtual environment "source > /usr/pgadmin4/venv/bin/activate" and then try to run > "/usr/pgadmin4/venv/bin/python3 -s /usr/pgadmin4/web/pgAdmin4.py" and > check whether it works or the same error. Hello Akshay, Thanks for responding. I tried that.... the "activate" command worked, and the command prompt now had "(venv)" in front of it. However, the second command failed with: /usr/pgadmin4/venv/bin/python3: No such file or directory When I look into that directory, /usr/pgadmin4/venv/bin/python3 is symlinked to /usr/bin/python3.8. However, on my system I see instead /usr/bin/python3.9. Just for fun, I tried running: /usr/bin/python3.9 -s /usr/pgadmin4/web/pgAdmin4.py However, it failed with: Traceback (most recent call last): File "/usr/pgadmin4/web/pgAdmin4.py", line 16, in <module> from cheroot.wsgi import Server as CherootServer ModuleNotFoundError: No module named 'cheroot' As I said in my first email, I appreciate that my Kubuntu version is ahead of the supported ones; so I'm happy enough to wait until a pgAdmin version which works on my computer is released - at the rate at which you guys work, I'm sure that won't be long! In the meantime, I still have psql. :-) Thanks, Ray. -- Raymond O'Donnell // Galway // Ireland ray@rodonnell.ie
Hi Ray,
A working solution would be to recreate the symlink to match your python. Use the below command -
sudo rm /usr/pgadmin4/venv/bin/python3 && sudo ln -s /usr/bin/python3.9 /usr/pgadmin4/venv/bin/python3
On Tue, May 4, 2021 at 2:12 AM Ray O'Donnell <ray@rodonnell.ie> wrote:
On 03/05/2021 07:17, Akshay Joshi wrote:
> I would suggest activating the virtual environment "source
> /usr/pgadmin4/venv/bin/activate" and then try to run
> "/usr/pgadmin4/venv/bin/python3 -s /usr/pgadmin4/web/pgAdmin4.py" and
> check whether it works or the same error.
Hello Akshay,
Thanks for responding. I tried that.... the "activate" command worked,
and the command prompt now had "(venv)" in front of it. However, the
second command failed with:
/usr/pgadmin4/venv/bin/python3: No such file or directory
When I look into that directory, /usr/pgadmin4/venv/bin/python3 is
symlinked to /usr/bin/python3.8. However, on my system I see instead
/usr/bin/python3.9. Just for fun, I tried running:
/usr/bin/python3.9 -s /usr/pgadmin4/web/pgAdmin4.py
However, it failed with:
Traceback (most recent call last):
File "/usr/pgadmin4/web/pgAdmin4.py", line 16, in <module>
from cheroot.wsgi import Server as CherootServer
ModuleNotFoundError: No module named 'cheroot'
As I said in my first email, I appreciate that my Kubuntu version is
ahead of the supported ones; so I'm happy enough to wait until a pgAdmin
version which works on my computer is released - at the rate at which
you guys work, I'm sure that won't be long! In the meantime, I still
have psql. :-)
Thanks,
Ray.
--
Raymond O'Donnell // Galway // Ireland
ray@rodonnell.ie
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | edbpostgres.com
"Don't Complain about Heat, Plant a TREE"
Hi
On Tue, May 4, 2021 at 6:34 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Ray,A working solution would be to recreate the symlink to match your python. Use the below command -
sudo rm /usr/pgadmin4/venv/bin/python3 && sudo ln -s /usr/bin/python3.9 /usr/pgadmin4/venv/bin/python3
There's a pretty good chance that won't work; any of the python modules in the venv that use cpython will be linked against Python 3.8.
Ray, we do have snapshot builds for Hirsute - you would probably be best using them until 5.3 is released: https://www.postgresql.org/ftp/pgadmin/pgadmin4/snapshots/2021-05-04/apt/
Note that the snapshots go into a distinct repo every day, so if you want to update, you'll need to update the repo config (and then switch it back to the production repo once 5.3 is out).
On Tue, May 4, 2021 at 2:12 AM Ray O'Donnell <ray@rodonnell.ie> wrote:On 03/05/2021 07:17, Akshay Joshi wrote:
> I would suggest activating the virtual environment "source
> /usr/pgadmin4/venv/bin/activate" and then try to run
> "/usr/pgadmin4/venv/bin/python3 -s /usr/pgadmin4/web/pgAdmin4.py" and
> check whether it works or the same error.
Hello Akshay,
Thanks for responding. I tried that.... the "activate" command worked,
and the command prompt now had "(venv)" in front of it. However, the
second command failed with:
/usr/pgadmin4/venv/bin/python3: No such file or directory
When I look into that directory, /usr/pgadmin4/venv/bin/python3 is
symlinked to /usr/bin/python3.8. However, on my system I see instead
/usr/bin/python3.9. Just for fun, I tried running:
/usr/bin/python3.9 -s /usr/pgadmin4/web/pgAdmin4.py
However, it failed with:
Traceback (most recent call last):
File "/usr/pgadmin4/web/pgAdmin4.py", line 16, in <module>
from cheroot.wsgi import Server as CherootServer
ModuleNotFoundError: No module named 'cheroot'
As I said in my first email, I appreciate that my Kubuntu version is
ahead of the supported ones; so I'm happy enough to wait until a pgAdmin
version which works on my computer is released - at the rate at which
you guys work, I'm sure that won't be long! In the meantime, I still
have psql. :-)
Thanks,
Ray.
--
Raymond O'Donnell // Galway // Ireland
ray@rodonnell.ie--Thanks,Aditya ToshniwalpgAdmin hacker | Sr. Software Engineer | edbpostgres.com"Don't Complain about Heat, Plant a TREE"
On 04/05/2021 08:39, Dave Page wrote: > Hi > > On Tue, May 4, 2021 at 6:34 AM Aditya Toshniwal > <aditya.toshniwal@enterprisedb.com > <mailto:aditya.toshniwal@enterprisedb.com>> wrote: > > Hi Ray, > > A working solution would be to recreate the symlink to match your > python. Use the below command - > > *|sudo rm /usr/pgadmin4/venv/bin/python3 && sudo ln -s > /usr/bin/python3.9 /usr/pgadmin4/venv/bin/python3|* > > There's a pretty good chance that won't work; any of the python modules > in the venv that use cpython will be linked against Python 3.8. Hi Dave, Indeed - it didn't work when I ran /usr/bin/python3.9 directly. > Ray, we do have snapshot builds for Hirsute - you would probably be best > using them until 5.3 is released: I've done that, and it works - thanks a million! Ray. -- Raymond O'Donnell // Galway // Ireland ray@rodonnell.ie