I have installed PostgreSQL 9.6.2 on my Windows 8.1. But the pgadmin4 is not able to contact the local server. I have tried several solutions suggested here in stackoverflow
If you use older postgresql version like 9.x and its services is running,PgAdmin 4 confused which server is base database.
So stop the service older version or new one.Run PgAdmin 4 as Administrator
Its worked for me
For my case in Windows 10 for postgresql 10 version, it worked by changing SERVER_MODE
to False
in config_distro.py
placed in web folder, as per these configuration settings: https://www.pgadmin.org/docs/pgadmin4/dev/desktop_deployment.html.
There are other settings mentioned in this answer (https://superuser.com/a/1131964) regarding python but I just changed SERVER_MODE
and it worked.
What finally worked was downgrading to pgadminIII-v.1.22:
We got the same issue. so no any change in the file. but start pgAdmin 4 using administrator.
The following step. 1. right click pgAdmin 4 icon 2. select "Run As Administrator"
If none of the methods help try checking your system and user environments PATH and PYTHONPATH variables.
I was getting this error due to my PATH variable was pointing to different Python installation (which comes from ArcGIS Desktop).
After removing path to my Python installation from PATH variable and completely removing PYTHONPATH variable, I got it working!
Keep in mind that python command will not be available from command line if you remove it from PATH.
Just click on that pgadmin 4 icon and run as administrator. Allow the access permissions. It will start locally.