I’m making a telegram bot that sends tasks from the site https://phys-ege.sdamgia.ru / You need to send an Image.
As I understand it, you need to convert svg to png or jpeg, but when using the pyvips library it gives an error
Traceback (most recent call last):
File "D:/Питончик/hbntdfg.py", line 1, in <module>
import pyvips
File "C:UsersdenveAppDataLocalProgramsPythonPython311Libsite-packagespyvips__init__.py", line 70, in <module>
gobject_lib = ffi.dlopen(_gobject_libname)
File "C:UsersdenveAppDataLocalProgramsPythonPython311Libsite-packagescffiapi.py", line 150, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
File "C:UsersdenveAppDataLocalProgramsPythonPython311Libsite-packagescffiapi.py", line 832, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
File "C:UsersdenveAppDataLocalProgramsPythonPython311Libsite-packagescffiapi.py", line 828, in _load_backend_lib
return backend.load_library(path, flags)
OSError: cannot load library 'C:Program Files (x86)GTK2-Runtimebinlibgobject-2.0-0.dll': error 0xc1
2
Answers
I think you are seeing DLL clashes.
pyvips is trying to open
libgobject-2.0-0.dll
and it’s finding the one you have inC:Program Files (x86)GTK2-Runtime
. This is probably pretty old and won’t work with libvips, which needs quite a recentlibgobject
.Have a look at the win install notes:
https://github.com/libvips/pyvips#windows-install
And make sure you follow the instructions for python 3.8 and later.