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 [email protected]
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 [email protected]
    

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

Hello, I had the same issue, so I tried all the things writen before, but what finally works for me was install scoop following this:

the run again python -m remo_app init and wait for postgresql installation to be completed.

Hope it helps!

1 Like

Still Error

ERROR: failed to launch postgres

I also have install postgresql-12.3-1-windows-x64 manually but still not working

Hi @koke , thanks for the pointer! Let us know what you think of remo after you played with it :slight_smile:

It looks like we are having some issues with installing postgres on Windows, we will look into this.

@DeepKothadiya hello there.

Can you tell us more about your setup?

  • when doing python -m remo_app init, can you copy the system information printed on screen?

  • how and where did you install postgres? if you run where postgres, it should print the location the binary file

My error is too big !!! and it is like

  • Prepare database
    Traceback (most recent call last):
    File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\pyvips_init_.py”, line 19, in
    import _libvips
    ModuleNotFoundError: No module named ‘_libvips’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\runpy.py”, line 193, in run_module_as_main
return run_code(code, main_globals, None,
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\runpy.py”, line 86, in run_code
exec(code, run_globals)
File "C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\remo_app_main
.py", line 3, in
app()
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\typer\main.py”, line 211, in call
return get_command(self)()
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\click\core.py”, line 829, in call
return self.main(*args, **kwargs)
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\click\core.py”, line 782, in main
rv = self.invoke(ctx)
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\click\core.py”, line 1259, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\click\core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\click\core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\typer\main.py”, line 494, in wrapper
return callback(**use_params) # type: ignore
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\remo_app\cmd\cmd.py”, line 58, in init
migrate()
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\remo_app\cmd\db.py”, line 14, in migrate
manage(‘migrate’)
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\remo_app\cmd\db.py”, line 9, in manage
execute_from_command_line(argv)
File "C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\django\core\management_init
.py", line 381, in execute_from_command_line
utility.execute()
File "C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\django\core\management_init
.py", line 357, in execute
django.setup()
File "C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\django_init
.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\django\apps\registry.py”, line 114, in populate
app_config.import_models()
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\django\apps\config.py”, line 211, in import_models
self.models_module = import_module(models_module_name)
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\importlib_init_.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1014, in _gcd_import
File “”, line 991, in _find_and_load
File “”, line 975, in _find_and_load_unlocked
File “”, line 671, in load_unlocked
File “”, line 783, in exec_module
File “”, line 219, in call_with_frames_removed
File "C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\remo_app\remo\models_init
.py", line 1, in
from .annotation import (
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\remo_app\remo\models\annotation.py”, line 8, in
from .dataset import DatasetImage, Dataset
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\remo_app\remo\models\dataset.py”, line 6, in
import pyvips
File "C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\pyvips_init
.py", line 70, in
gobject_lib = ffi.dlopen(_gobject_libname)
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\cffi\api.py”, line 150, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\cffi\api.py”, line 832, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
File “C:\Users\DEEP\AppData\Local\Programs\Python\Python38\lib\site-packages\cffi\api.py”, line 827, in _load_backend_lib
raise OSError(msg)
OSError: cannot load library ‘libgobject-2.0-0.dll’: error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called ‘libgobject-2.0-0.dll’

Thanks for this @DeepKothadiya - this looks like a separate issue from what you were reporting before. Did you manage to get postgres going?

The issue reported now seem to be around a missing library (vips), which is installed when doing python -m remo_app init.

Assuming you managed to install postgres, what I can suggest is:

  • manually delete the remo home folder (which should be at C:\Users\DEEP\.remo )
  • try running again python -m remo_app init
  • then run python -m remo_app

Hope this works!

Thanks @andrea
Its working
:+1:

1 Like