ERROR : Failed to launch postgres

After installing remo from pip, when I ran initialization command, got these error
“Failed to launch postgres”, I tried installing postgres manually (pip), still same error

(remo) C:\Users\Jainam>python -m remo_app init

===============================================
((
(>’:’) Remo: v0.3.42

Python: 3.7.3, Windows-10-10.0.18362-SP0

Initiailizing Remo:

This will download and install the following packages as needed:

  • vips
  • postgres
  • scoop
  • git
  • unzip
  • aria2
    Do you want to continue? [Y/n]: y

[-] Installing scoop
$ powershell.exe -Command “iwr -useb get.scoop.sh | iex”
$ scoop install aria2
$ scoop install unzip


[-] Installing vips lib


[-] Installing postgres
$ scoop install postgresql@12.2
Launching postgres …
$ pg_ctl start
$ pg_ctl start
$ pg_ctl start
ERROR: failed to launch postgres

(remo) C:\Users\Jainam>

This looks like an issue with permissions on Windows.

Can you try to run pg_ctl status in new Windows Shell.
Let us know if you get an error.

But if all good:

  • you should be able to launch postgres manually with pg_ctl start
  • run again python -m remo_app init from within the virtual environment
  • you should be good to go

I tried executing pg_ctl status in new window shell (with admin), I received this error:
‘pg_ctl’ is not recognized as an internal or external command, operable program or batch file.

It looks like possibly Postgres wasn’t installed correctly.

  • Are you able to see if it was installed? e.g. on Windows there might be an entry in the Start menu.

  • You can also try to install postgres manually, using the same command the installation script uses:

    scoop install postgresql@12.2
    

If you have issue with installation, please report back and we can try to help.
You can also have a look at this thread https://github.com/lukesampson/scoop/issues/1359 - some guys reported having some issues because of antivirus or Windows defender