DEV Community

Chidera Stella Onumajuru
Chidera Stella Onumajuru

Posted on • Updated on

Step-by-step guide on installing pgAmin from source code on windows and configuring it for development.


pgAdmin is a management tool for PostgreSQL and EDB Postgres advanced server, in this blog post, You will install it from source code in your Windows machine. According to the official GitHub repo,

pgAdmin 4 is written as a web application in Python, using jQuery and Bootstrap for the client side processing and UI. On the server side, Flask is being utilised.


You need to install the tools below.

Installation Guide.

  1. Create a directory in any terminal of choice, I will be using gitbash for this tutorial.

    mkdir pgadmin && cd pgadmin
  2. Clone the repository from GitHub by running the command below.

    git clone

    This will successfully install it.

Building the Runtime for the frontend.

  1. To build the runtime for the frontend, enter into the directory /pgadmin4/runtime, create a new file called dev_config.json copy the contents of the file into this file. Inside the dev_config.jsonfile, edit the python path to the actual path to the python.exe in your machine.

  2. Run the command yarn install.

  3. Execute the runtime by running this command.


    This will start the pgAdmin.

Configuring the Python Environment for the Backend.

  1. To configure the python environment, from the pgadmin directory, create a virtual environment and activate this environment by running this command.

    cd ..
    python -m virtualenv penv # creates a virtual environment
    source penv/Scripts/activate #activates the virtual environment
  2. Upgrade to the latest version of pip if you are not using one already, as pgAdmin requires the latest version via this command below.

    pip install --upgrade pip
  3. Add the part to your Postgres bin directory to your environment variables by running this command, this is necessary so pg-config can be found for building psycopg3.

    export PATH="$PATH:/c/Program Files/PostgreSQL/15/bin"

    This path, is the path to the PostgreSQL 15 I installed via the Windows installer. You can replace 15 with any version that you have.

  4. Install the dependencies by running this command.

    pip install -r requirements.txt
  5. Start the server by running the command below.

  6. Finally, this Starting pgAdmin 4. Please navigate to in your browser. will be seen on the terminal, which shows the server has started Happy coding.

Please do give me a like and a follow if you enjoyed this blogpost.

Top comments (0)