First install development package for compiling latest pscyopg2 package.
Note: make sure the version of postgresql server that will be remote using pgAdmin4 is 9.0 above.
sudo apt-get install python-dev postgresql-server-dev-9.5
Copy this script in /tmp/install_pgadmin4.sh.
Run installation script as root user
execute script /opt/pgadmin4/run.sh as normal user to run pgAdmin4 that can be accessed at http://127.0.0.1:5050 in your browser.