How to install pgAdmin 4 on linux

Published by akhisyabab

pgAdmin4 installation linux

What is pgAdmin?

pgAdmin is an opensource platform used for management, development, and manipulation of posgresql databases. Maybe you are familiar with phpmyadmin in the php programming language and mysql or mariadb for the database side. For more details about the understanding and history of pgAdmin, please visit https://www.pgadmin.org/





How to install pgAdmin

For this post I will show you how to install pgAdmin4 using python3 (I use python3.5) on linux. When this article is created, pgAdmin version 4 is a new and widely used version. Following are the installation steps:

Install the required postgres and python lib

sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
sudo apt-get install python-psycopg2
sudo apt-get install libpq-dev
sudo apt-get install libpython3.5-dev

After installation is complete, we can run pgAdmin as follows:

virtualenv -p python3 pg_env
source pg_env/bin/activate
wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v1.4/pip/pgadmin4-1.4-py2.py3-none-any.whl
pip install pgadmin4-1.4-py2.py3-none-any.whl
python3 pg_env/lib/python3.5/site-packages/pgadmin4/pgAdmin4.py

Command above we create virtual environment first. After running the last command, then for the first time it will be asked to enter an email and password to log in to pgAdmin later. The installation is complete there will be information to access pgAdmin at http://localhost: 5050. please open it through a browser and it will be like this:

Simple enough to install pgAdmin4 using python3 on linux. Hopefully useful, see you in the next post.

written by:
@akhisyabab

Categories: Tips&Tricks

Leave a Reply

Your email address will not be published. Required fields are marked *