This will also work with pyenv, but if its confusing I can make different notes.
Following these exact steps will not require a username and password to access pgadmin4, since its running in "desktop" mode.
pyenv install 3.6.5pyenv virtualenv 3.6.5 pgadminMake directory
mkdir ~/pgadmincd ~/pgadmin
pyenv local pgadminMake sure to use the right virtualenv, if you didnt follow step 3
Reference your download location or use the url if possible
pip install https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v3.6/pip/pgadmin4-3.6-py2.py3-none-any.whlvi ~/.pyenv/versions/pgadmin/lib/python3.6/site-packages/pgadmin4/config_local.pyFile contents:
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')cd ~/pgadmin | # incase you left the directory
python ~/.pyenv/versions/pgadmin/lib/python3.6/site-packages/pgadmin4/setup.pymake sure everthing is working.
cd ~/pgadmin | # incase you left the directory
python ~/.pyenv/versions/pgadmin/lib/python3.6/site-packages/pgadmin4/pgAdmin4.pyIf you get any errors, make sure you have right pyenv virtualenv active (step #3)
vi ~/pgadmin/pgadmin4.sh~/pgadmin/pgadmin4.sh content:
#!/usr/bin/env bash
cd ~/pgadmin
python ~/.pyenv/versions/pgadmin/lib/python3.6/site-packages/pgadmin4/pgAdmin4.py- ~/.zshrc - for zsh
- ~/.bashrc - for bash
alias pgadmin4='~/pgadmin/pgadmin4.sh'chmod +x ~/pgadmin/pgadmin4.sh- zsh
source ~/.zshrc- bash
source ~/.bashrcpgadmin4