$ virtualenv -p python3 pgadmin4
$ cd pgadmin4
$ source bin/activate
$ pip3 install https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v3.0/pip/pgadmin4-3.0-py2.py3-none-any.whl
The *.whl (wheel file) above is a ZIP-format archive with a specially formatted filename and the .whl extension and is a built-package format for Python. Go to https://www.postgresql.org/ftp/pgadmin/pgadmin4/ for the latest python wheel files.
All looked good until I opened the new version and attempted to run the Query Tool. Whenever I try to open the Query Tool by going through the drop down Tools menu, I would receive the error dialog "Query Tool Initialize Error."
By experimenting I found that instead of browsing to http://12.70.0.1:5050, when I changed the URL to http://localhost:5050, I was able to use the Query Tool via the drop down menus.
Therefore, what I did was edit the pgAdmin4/lib/python3.5/site-packages/pgadmin4/config.py file by updating the line:
DEFAULT_SERVER = '127.0.0.1'
to DEFAULT_SERVER = 'localhost'
Now when I start pgAdmin, all is good.
No comments:
Post a Comment