Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hiteshgarg14/641955d712eb92c1679fae250bfdfbae to your computer and use it in GitHub Desktop.
Save hiteshgarg14/641955d712eb92c1679fae250bfdfbae to your computer and use it in GitHub Desktop.

Revisions

  1. @Prototype-X Prototype-X revised this gist Oct 24, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ## Install pgAdmin4 v2.0 with python3 on Ubuntu 16.04 DESKTOP mode

    1. Get source code pgAdmin4
    1. Get Python Wheel pgAdmin4

    wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v2.0/pip/pgadmin4-2.0-py2.py3-none-any.whl

  2. @Prototype-X Prototype-X revised this gist Oct 24, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Install pgAdmin4 v2.0 with python3 on Ubuntu 16.04 DESKTOP mode
    ## Install pgAdmin4 v2.0 with python3 on Ubuntu 16.04 DESKTOP mode

    1. Get source code pgAdmin4

  3. @Prototype-X Prototype-X revised this gist Oct 24, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -70,7 +70,7 @@

    write at the end of file:

    alias pgadmin4='~/py3-venv-pgadmin/pgadmin.sh'
    alias pgadmin4='~/py3-venv-pgadmin/pgadmin4.sh'

    reload bashrc

  4. @Prototype-X Prototype-X revised this gist Oct 24, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Install pgAdmin4 2.0 with python3 on Ubuntu 16.04
    # Install pgAdmin4 v2.0 with python3 on Ubuntu 16.04 DESKTOP mode

    1. Get source code pgAdmin4

  5. @Prototype-X Prototype-X revised this gist Oct 24, 2017. 1 changed file with 15 additions and 1 deletion.
    16 changes: 15 additions & 1 deletion Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -64,4 +64,18 @@
    source activate
    python3 ~/py3-venv-pgadmin/lib/python3.5/site-packages/pgadmin4/pgAdmin4.py

    ![screenshot pgAdmin4](https://s18.postimg.org/q0kghmg49/pg_Admin4_py3.png)
    9. Create alias for bash

    nano ~/.bashrc

    write at the end of file:

    alias pgadmin4='~/py3-venv-pgadmin/pgadmin.sh'

    reload bashrc

    source ~/.bashrc

    now you can run pgadmin

    pgadmin4
  6. @Prototype-X Prototype-X revised this gist Oct 24, 2017. No changes.
  7. @Prototype-X Prototype-X revised this gist Oct 24, 2017. 1 changed file with 24 additions and 40 deletions.
    64 changes: 24 additions & 40 deletions Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -1,83 +1,67 @@
    # Install pgAdmin4 with python3 on Ubuntu 16.04
    # Install pgAdmin4 2.0 with python3 on Ubuntu 16.04

    1. Get source code pgAdmin4

    wget https://ftp.postgresql.org/pub/pgadmin3/pgadmin4/v1.0/source/pgadmin4-1.0.tar.gz
    wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v2.0/pip/pgadmin4-2.0-py2.py3-none-any.whl

    2. Unpack pgadmin4-1.0.tar.gz in home dir

    tar xvzf pgadmin4-1.0.tar.gz -C ~/

    3. Install pip3
    2. Install pip3

    sudo apt install python3-pip

    4. Install virtualenv
    3. Install virtualenv

    sudo pip3 install virtualenv

    5. Create virtualenv in dir ~/py3-venv-pgadmin
    4. Create virtualenv in dir ~/py3-venv-pgadmin

    virtualenv --system-site-packages --no-setuptools --python=python3.5 ~/py3-venv-pgadmin

    6. Activate virtualenv
    5. Activate virtualenv

    cd ~/py3-venv-pgadmin/bin
    source activate

    7. Check pip3
    6. Check pip3

    which pip3
    ~/py3-venv-pgadmin/bin/pip3

    8. Install libpq-dev

    sudo apt install libpq-dev

    9. Install requrements for python 3

    cd ~/pgadmin4-1.0
    pip3 install -r requirements_py3.txt

    10. Install qt-sdk
    4. Install pgAdmin4

    sudo apt install qt-sdk
    pip3 install pgadmin4-2.0-py2.py3-none-any.whl

    11. Build the runtime

    cd ~/pgadmin4-1.0/runtime
    qmake
    make

    12. [For desktop deployment](https://www.pgadmin.org/docs4/dev/desktop_deployment.html)
    5. [For desktop deployment](https://www.pgadmin.org/docs4/dev/desktop_deployment.html)

    cd ~/pgadmin4-1.0/web
    cd ~/py3-venv-pgadmin/lib/python3.5/site-packages/pgadmin4
    touch config_local.py
    nano config_local.py
    write:

    import os
    SERVER_MODE = False
    DATA_DIR = os.path.realpath(os.path.expanduser(u'~/.pgadmin/'))
    LOG_FILE = os.path.join(DATA_DIR, 'pgadmin4.log')
    SQLITE_PATH = os.path.join(DATA_DIR, 'pgadmin4.db')
    SESSION_DB_PATH = os.path.join(DATA_DIR, 'sessions')
    STORAGE_DIR = os.path.join(DATA_DIR, 'storage')

    run:

    python3 setup.py
    python3 ~/py3-venv-pgadmin/lib/python3.5/site-packages/pgadmin4/setup.py

    13. Run pgAdmin4
    6. Run pgAdmin4

    python3 pgAdmin4.py
    python3 ~/py3-venv-pgadmin/lib/python3.5/site-packages/pgadmin4/pgAdmin4.py

    14. Exit virtualenv
    7. Exit virtualenv

    deactivate

    15. Remove qt-sdk

    apt purge qt-sdk

    16. For run pgadmin4 create script ~/pgadmin4-1.0/pgadmin4.sh
    8. For run pgadmin4 create script ~/py3-venv-pgadmin/pgadmin4.sh

    #!/usr/bin/env bash
    cd ~/py3-venv-pgadmin/bin
    source activate
    python3 ~/pgadmin4-1.0/web/pgAdmin4.py
    python3 ~/py3-venv-pgadmin/lib/python3.5/site-packages/pgadmin4/pgAdmin4.py

    ![screenshot pgAdmin4](https://s18.postimg.org/q0kghmg49/pg_Admin4_py3.png)
  8. @Prototype-X Prototype-X revised this gist Oct 28, 2016. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -81,5 +81,3 @@
    python3 ~/pgadmin4-1.0/web/pgAdmin4.py

    ![screenshot pgAdmin4](https://s18.postimg.org/q0kghmg49/pg_Admin4_py3.png)

    [Archive pgAdmin4 with py3-venv, for use you need to perform steps: 3, 4, 8 and run pgadmin4.sh](https://drive.google.com/file/d/0Bx5RBhf-pBQcZGR4ZTlMTEc0SXc/view)
  9. @Prototype-X Prototype-X revised this gist Oct 22, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -82,4 +82,4 @@

    ![screenshot pgAdmin4](https://s18.postimg.org/q0kghmg49/pg_Admin4_py3.png)

    [Archive pgAdmin4 with py3-venv, for use you need to perform steps: 3, 4, 8, 9 and run pgadmin4.sh](https://drive.google.com/file/d/0Bx5RBhf-pBQcZGR4ZTlMTEc0SXc/view)
    [Archive pgAdmin4 with py3-venv, for use you need to perform steps: 3, 4, 8 and run pgadmin4.sh](https://drive.google.com/file/d/0Bx5RBhf-pBQcZGR4ZTlMTEc0SXc/view)
  10. @Prototype-X Prototype-X revised this gist Oct 22, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -82,4 +82,4 @@

    ![screenshot pgAdmin4](https://s18.postimg.org/q0kghmg49/pg_Admin4_py3.png)

    [Archive pgAdmin4 with py3, for use you need to perform steps: 3, 4, 8, 9 and run pgadmin4.sh](https://drive.google.com/file/d/0Bx5RBhf-pBQcZGR4ZTlMTEc0SXc/view)
    [Archive pgAdmin4 with py3-venv, for use you need to perform steps: 3, 4, 8, 9 and run pgadmin4.sh](https://drive.google.com/file/d/0Bx5RBhf-pBQcZGR4ZTlMTEc0SXc/view)
  11. @Prototype-X Prototype-X revised this gist Oct 22, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -82,4 +82,4 @@

    ![screenshot pgAdmin4](https://s18.postimg.org/q0kghmg49/pg_Admin4_py3.png)

    [Archive pgAdmin4 with py3, for use you need to perform steps: 3, 4, 8, 9](https://drive.google.com/file/d/0Bx5RBhf-pBQcZGR4ZTlMTEc0SXc/view)
    [Archive pgAdmin4 with py3, for use you need to perform steps: 3, 4, 8, 9 and run pgadmin4.sh](https://drive.google.com/file/d/0Bx5RBhf-pBQcZGR4ZTlMTEc0SXc/view)
  12. @Prototype-X Prototype-X revised this gist Oct 22, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -82,4 +82,4 @@

    ![screenshot pgAdmin4](https://s18.postimg.org/q0kghmg49/pg_Admin4_py3.png)

    [Archive pgAdmin4 with py3, for use you need to perform steps: 3, 4, 8](https://drive.google.com/file/d/0Bx5RBhf-pBQcZGR4ZTlMTEc0SXc/view)
    [Archive pgAdmin4 with py3, for use you need to perform steps: 3, 4, 8, 9](https://drive.google.com/file/d/0Bx5RBhf-pBQcZGR4ZTlMTEc0SXc/view)
  13. @Prototype-X Prototype-X revised this gist Oct 14, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -82,4 +82,4 @@

    ![screenshot pgAdmin4](https://s18.postimg.org/q0kghmg49/pg_Admin4_py3.png)

    ![Archive pgAdmin4 with py3, for use you need to perform steps: 3, 4, 8](https://drive.google.com/file/d/0Bx5RBhf-pBQcZGR4ZTlMTEc0SXc/view)
    [Archive pgAdmin4 with py3, for use you need to perform steps: 3, 4, 8](https://drive.google.com/file/d/0Bx5RBhf-pBQcZGR4ZTlMTEc0SXc/view)
  14. @Prototype-X Prototype-X revised this gist Oct 14, 2016. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -80,4 +80,6 @@
    source activate
    python3 ~/pgadmin4-1.0/web/pgAdmin4.py

    ![screenshot pgAdmin4](https://s18.postimg.org/q0kghmg49/pg_Admin4_py3.png)
    ![screenshot pgAdmin4](https://s18.postimg.org/q0kghmg49/pg_Admin4_py3.png)

    ![Archive pgAdmin4 with py3, for use you need to perform steps: 3, 4, 8](https://drive.google.com/file/d/0Bx5RBhf-pBQcZGR4ZTlMTEc0SXc/view)
  15. @Prototype-X Prototype-X revised this gist Oct 11, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -34,7 +34,7 @@

    sudo apt install libpq-dev

    9. Install requrements
    9. Install requrements for python 3

    cd ~/pgadmin4-1.0
    pip3 install -r requirements_py3.txt
  16. @Prototype-X Prototype-X revised this gist Oct 10, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -79,3 +79,5 @@
    cd ~/py3-venv-pgadmin/bin
    source activate
    python3 ~/pgadmin4-1.0/web/pgAdmin4.py

    ![screenshot pgAdmin4](https://s18.postimg.org/q0kghmg49/pg_Admin4_py3.png)
  17. @Prototype-X Prototype-X revised this gist Oct 10, 2016. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@

    sudo pip3 install virtualenv

    5. Create virtualenv
    5. Create virtualenv in dir ~/py3-venv-pgadmin

    virtualenv --system-site-packages --no-setuptools --python=python3.5 ~/py3-venv-pgadmin

    @@ -54,7 +54,11 @@
    cd ~/pgadmin4-1.0/web
    touch config_local.py
    nano config_local.py
    write:

    SERVER_MODE = False
    run:

    python3 setup.py

    13. Run pgAdmin4
  18. @Prototype-X Prototype-X revised this gist Oct 10, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,8 @@
    wget https://ftp.postgresql.org/pub/pgadmin3/pgadmin4/v1.0/source/pgadmin4-1.0.tar.gz

    2. Unpack pgadmin4-1.0.tar.gz in home dir

    tar xvzf pgadmin4-1.0.tar.gz -C ~/

    3. Install pip3

  19. @Prototype-X Prototype-X revised this gist Oct 10, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Install pgAdmin4 with python3 on Ubuntu 16.04

    1. Get source pgAdmin4
    1. Get source code pgAdmin4

    wget https://ftp.postgresql.org/pub/pgadmin3/pgadmin4/v1.0/source/pgadmin4-1.0.tar.gz

  20. @Prototype-X Prototype-X revised this gist Oct 10, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -67,7 +67,7 @@

    apt purge qt-sdk

    16. For run bash script ~/pgadmin4-1.0/pgadmin4.sh
    16. For run pgadmin4 create script ~/pgadmin4-1.0/pgadmin4.sh

    #!/usr/bin/env bash
    cd ~/py3-venv-pgadmin/bin
  21. @Prototype-X Prototype-X renamed this gist Oct 10, 2016. 1 changed file with 2 additions and 2 deletions.
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,10 @@
    # Install pgAdmin4 with python3 on ubuntu 16.04
    # Install pgAdmin4 with python3 on Ubuntu 16.04

    1. Get source pgAdmin4

    wget https://ftp.postgresql.org/pub/pgadmin3/pgadmin4/v1.0/source/pgadmin4-1.0.tar.gz

    2. unpack pgadmin4-1.0.tar.gz in home dir
    2. Unpack pgadmin4-1.0.tar.gz in home dir

    3. Install pip3

  22. @Prototype-X Prototype-X revised this gist Oct 10, 2016. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions pgAdmin4_install_with_python3_on_ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -66,3 +66,10 @@
    15. Remove qt-sdk

    apt purge qt-sdk

    16. For run bash script ~/pgadmin4-1.0/pgadmin4.sh

    #!/usr/bin/env bash
    cd ~/py3-venv-pgadmin/bin
    source activate
    python3 ~/pgadmin4-1.0/web/pgAdmin4.py
  23. @Prototype-X Prototype-X revised this gist Oct 10, 2016. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions pgAdmin4_install_with_python3_on_ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -8,11 +8,11 @@

    3. Install pip3

    apt install python3-pip
    sudo apt install python3-pip

    4. Install virtualenv

    pip3 install virtualenv
    sudo pip3 install virtualenv

    5. Create virtualenv

    @@ -30,7 +30,7 @@

    8. Install libpq-dev

    apt install libpq-dev
    sudo apt install libpq-dev

    9. Install requrements

    @@ -39,7 +39,7 @@

    10. Install qt-sdk

    apt install qt-sdk
    sudo apt install qt-sdk

    11. Build the runtime

  24. @Prototype-X Prototype-X revised this gist Oct 10, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions pgAdmin4_install_with_python3_on_ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # Install pgAdmin4 with python3 on ubuntu 16.04

    1. Get source pgAdmin4

    wget https://ftp.postgresql.org/pub/pgadmin3/pgadmin4/v1.0/source/pgadmin4-1.0.tar.gz
  25. @Prototype-X Prototype-X revised this gist Oct 10, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pgAdmin4_install_with_python3_on_ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    wget https://ftp.postgresql.org/pub/pgadmin3/pgadmin4/v1.0/source/pgadmin4-1.0.tar.gz

    2. unpak pgadmin4-1.0.tar.gz in home dir
    2. unpack pgadmin4-1.0.tar.gz in home dir

    3. Install pip3

  26. @Prototype-X Prototype-X revised this gist Oct 10, 2016. 1 changed file with 50 additions and 26 deletions.
    76 changes: 50 additions & 26 deletions pgAdmin4_install_with_python3_on_ubuntu 16.04.md
    Original file line number Diff line number Diff line change
    @@ -1,42 +1,66 @@
    1. Get source pgAdmin4

    ```
    wget https://ftp.postgresql.org/pub/pgadmin3/pgadmin4/v1.0/source/pgadmin4-1.0.tar.gz
    ```
    wget https://ftp.postgresql.org/pub/pgadmin3/pgadmin4/v1.0/source/pgadmin4-1.0.tar.gz

    2. unpak pgadmin4-1.0.tar.gz in home dir

    3. Install pip3
    apt install python3-pip

    apt install python3-pip

    4. Install virtualenv
    pip3 install virtualenv

    pip3 install virtualenv

    5. Create virtualenv
    virtualenv --system-site-packages --no-setuptools --python=python3.5 ~/py3-venv-pgadmin

    virtualenv --system-site-packages --no-setuptools --python=python3.5 ~/py3-venv-pgadmin

    6. Activate virtualenv
    cd ~/py3-venv-pgadmin/bin
    source activate

    cd ~/py3-venv-pgadmin/bin
    source activate

    7. Check pip3
    which pip3
    ~/py3-venv-pgadmin/bin/pip3

    which pip3
    ~/py3-venv-pgadmin/bin/pip3

    8. Install libpq-dev
    apt install libpq-dev

    apt install libpq-dev

    9. Install requrements
    cd ~/pgadmin4-1.0
    pip3 install -r requirements_py3.txt

    cd ~/pgadmin4-1.0
    pip3 install -r requirements_py3.txt

    10. Install qt-sdk
    apt install qt-sdk

    apt install qt-sdk

    11. Build the runtime
    cd ~/pgadmin4-1.0/runtime
    qmake
    make
    12. For desktop deployment
    cd ~/pgadmin4-1.0/web
    touch config_local.py
    nano config_local.py
    SERVER_MODE = False
    python3 setup.py

    cd ~/pgadmin4-1.0/runtime
    qmake
    make

    12. [For desktop deployment](https://www.pgadmin.org/docs4/dev/desktop_deployment.html)

    cd ~/pgadmin4-1.0/web
    touch config_local.py
    nano config_local.py
    SERVER_MODE = False
    python3 setup.py

    13. Run pgAdmin4
    python3 pgAdmin4.py

    python3 pgAdmin4.py

    14. Exit virtualenv
    deactivate

    deactivate

    15. Remove qt-sdk
    apt purge qt-sdk

    apt purge qt-sdk
  27. @Prototype-X Prototype-X renamed this gist Oct 10, 2016. 1 changed file with 2 additions and 4 deletions.
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,7 @@
    **TL;DR**

    1. Get source pgAdmin4

    ```bash
    wget https://ftp.postgresql.org/pub/pgadmin3/pgadmin4/v1.0/source/pgadmin4-1.0.tar.gz
    ```
    wget https://ftp.postgresql.org/pub/pgadmin3/pgadmin4/v1.0/source/pgadmin4-1.0.tar.gz
    ```

    2. unpak pgadmin4-1.0.tar.gz in home dir
  28. @Prototype-X Prototype-X revised this gist Oct 10, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions pgAdmin4 install with python3 on ubuntu 16.04
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    **TL;DR**

    1. Get source pgAdmin4

    ```bash
  29. @Prototype-X Prototype-X renamed this gist Oct 10, 2016. 1 changed file with 0 additions and 0 deletions.
  30. @Prototype-X Prototype-X revised this gist Oct 10, 2016. No changes.