-
Get Python Wheel pgAdmin4
wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v2.0/pip/pgadmin4-2.0-py2.py3-none-any.whl
-
Install pip3
sudo apt install python3-pip
-
Install virtualenv
sudo pip3 install virtualenv
-
Create virtualenv in dir ~/py3-venv-pgadmin
virtualenv --system-site-packages --no-setuptools --python=python3.5 ~/py3-venv-pgadmin
-
Activate virtualenv
cd ~/py3-venv-pgadmin/bin source activate
-
Check pip3
which pip3 ~/py3-venv-pgadmin/bin/pip3
-
Install pgAdmin4
pip3 install pgadmin4-2.0-py2.py3-none-any.whl
-
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 ~/py3-venv-pgadmin/lib/python3.5/site-packages/pgadmin4/setup.py
-
Run pgAdmin4
python3 ~/py3-venv-pgadmin/lib/python3.5/site-packages/pgadmin4/pgAdmin4.py
-
Exit virtualenv
deactivate
-
For run pgadmin4 create script ~/py3-venv-pgadmin/pgadmin4.sh
#!/usr/bin/env bash cd ~/py3-venv-pgadmin/bin source activate python3 ~/py3-venv-pgadmin/lib/python3.5/site-packages/pgadmin4/pgAdmin4.py
-
Create alias for bash
nano ~/.bashrc
write at the end of file:
alias pgadmin4='~/py3-venv-pgadmin/pgadmin4.sh'
reload bashrc
source ~/.bashrc
now you can run pgadmin
pgadmin4
Last active
January 30, 2022 23:24
-
-
Save Prototype-X/fd8bf6d8b929224621613316bf37db02 to your computer and use it in GitHub Desktop.
Install pgAdmin4 v2.0 with python3 on Ubuntu 16.04 DESKTOP mode
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
me da el error de status 1 en el paso 6.. alguen me puede ayudar por favor?