I had issues running pgadmin4-web after following the installation instructions on their website, so I took it upon myself to find out the the best way to install it without any issues, and I managed to discover a method that helped me set it up hassle free.
Here it is. Make sure you execute the commands below one after the other on your terminal.
$ sudo mkdir /var/lib/pgadmin
$ sudo mkdir /var/log/pgadmin
$ sudo chown $USER /var/lib/pgadmin
$ sudo chown $USER /var/log/pgadmin
# Create virtual environment
$ python3 -m venv pgadmin4
$ source pgadmin4/bin/activate
# Install pgadmin4
(pgadmin4) $ pip install pgadmin4
# Start pgadmin4
(pgadmin4) $ pgadmin4
Source – https://stackoverflow.com/questions/71992446/installing-pgadmin4-web-on-ubuntu-desktop-22-04