Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named "_libvips" #14

Open
ReallyRad opened this issue Feb 9, 2024 · 4 comments
Open

No module named "_libvips" #14

ReallyRad opened this issue Feb 9, 2024 · 4 comments

Comments

@ReallyRad
Copy link

Hello,

After installing kubi with pip I'm unable to run any commands because of the following error :

`ModuleNotFoundError: No module named '_libvips'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Arthur\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\Arthur\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\Arthur\AppData\Local\Programs\Python\Python310\Scripts\kubi.exe_main
.py", line 7, in
File "C:\Users\Arthur\AppData\Local\Programs\Python\Python310\lib\site-packages\kubi\kubi.py", line 347, in run
main(sys.argv[1:])
File "C:\Users\Arthur\AppData\Local\Programs\Python\Python310\lib\site-packages\kubi\kubi.py", line 343, in main
kubi(args)
File "C:\Users\Arthur\AppData\Local\Programs\Python\Python310\lib\site-packages\kubi\kubi.py", line 38, in kubi
import pyvips
File "C:\Users\Arthur\AppData\Local\Programs\Python\Python310\lib\site-packages\pyvips_init
.py", line 70, in
gobject_lib = ffi.dlopen(_gobject_libname)
File "C:\Users\Arthur\AppData\Local\Programs\Python\Python310\lib\site-packages\cffi\api.py", line 150, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
File "C:\Users\Arthur\AppData\Local\Programs\Python\Python310\lib\site-packages\cffi\api.py", line 832, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
File "C:\Users\Arthur\AppData\Local\Programs\Python\Python310\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'`

I'm using python 3.10

Any suggestions?

thanks

@indus
Copy link
Owner

indus commented Feb 9, 2024 via email

@ReallyRad
Copy link
Author

Hello,
numpy 1.26.4 and pyvips 2.2.2 are indeed installed. Could you share the recommended versions of python and of those two packages?
thanks

@indus
Copy link
Owner

indus commented Feb 9, 2024 via email

@indus
Copy link
Owner

indus commented Feb 9, 2024

@ReallyRad Did you had success already?

I would first try to follow the pyvips installation guide: https://github.com/libvips/pyvips?tab=readme-ov-file#windows-install
First download this: https://github.com/libvips/build-win64-mxe/releases/download/v8.14.4/vips-dev-w64-all-8.14.4.zip unzip it to your filesystem and then use kubi like so: kubi --vips path/to/the/vips/bin ... (this will add the folder to PATH as described in the pyvips installation guide: https://github.com/indus/kubi/blob/main/src/kubi/kubi.py#L34-L36).

But because you asked - I'm running kubi with:

  • python 3.10.2
  • pyvips 2.2.1
  • numpy 1.24.1

But that is not a recommendation - just my currently installed versions ;-)
And I don't think the problem is caused by those minor misalignments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants