pgadmin4 failed after upgrade ubuntu 20.04

From: bw <bwakkie(at)gmail(dot)com>
To: PgAdmin Support List <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: pgadmin4 failed after upgrade ubuntu 20.04
Date: 2020-07-02 15:11:36
Message-ID: CAKqYf_JuUvJT0gU3NuOhRmR8n1Dg2B+h5ozSFDMNSTP7BweKPQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi,

I upgraded ubuntu from 19.10 to 20.04 and pgAdmin4 wasn' t working anymore.
I got an 500 error. I wanted to upgrade pgadmin4 too via pip but inside the
virtualenv even pip wasn't working anymore.
I guessed it was to do with the python version now being 3.8 but still
having 2.7 as default. So I installed python-is-python3 and was able to
create a new venv and was able to install pgadmin4 via pip.

But still I do got an 500 error that the python version is not correct,
which is checked in pgAdmin4.wsgi

Within the virtualenv I see that the version is correct (or is it?)
(pgadmin) root(at)server:/data/.envs/pgadmin# python --version
Python 3.8.2
pgAdmin4.wsgi tests this in the following way:
if sys.version_info < (3, 4):
raise Exception('This application must be run under Python 3.4 or later
')
Which is in my findings correct. Why do I get this error?

I finally found out that the standard mod_wsgi is compiled against python
2.7
So after installing libapache2-mod-wsgi-py3 all was fine :)

In all this search I changed a lot of config settings as the apache config
was still pointing to ../lib/python3.7/.. and I changed the virtualenv name
from pgadmin4 to pgadmin. So I am sure there were errors there too along
the way.

I am just sending this in case someone else like me got into trouble, as in
total my pgAdmin was down a couple of days.

Cheers,
Bastiaan

Browse pgadmin-support by date

  From Date Subject
Next Message Cormac Martinez del Rio 2020-07-07 15:56:22 application not opening
Previous Message John Zhang 2020-07-02 12:27:44 Fwd: 'Data Output' tab has No Horizontal Scrolling