Having read the PgAdmin docs, it’s not easy to find which paths are being used on Mac OS X.
Using PgAdmin 4.27, the paths on my Mac OS X 11.2.1 are:
#sets path to Python
export PYTHONHOME=/Applications/pgAdmin\ 4.app/Contents/Resources/venv
/Applications/pgAdmin\ 4.app/Contents/Resources/venv/bin/python
#exports servers to ~/Downloads
/Applications/pgAdmin\ 4.app/Contents/Resources/web/setup.py --dump-servers ~/Downloads/pgadmin-servers.json --sqlite-path ~/.pgadmin/pgadmin4.db
On my new machine, I’ve set up PgAdmin via HomeBrew, like so:
brew install pgadmin4
The paths for this setup were a little different and I needed to unset PYTHONHOME
unset PYTHONHOME
/Applications/pgAdmin\ 4.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python3 /Applications/pgAdmin\ 4.app/Contents/Resources/web/setup.py --load-servers ~/Downloads/pgadmin-servers.json --sqlite-path ~/.pgadmin/pgadmin4.db
One more thing which might help someone: you can view pgAdmin paths via:
pgAdmin -> File -> Runtime->View log