Does not seem to work anymore after forced company windows10 21H2 update.
get: ModuleNotFoundError: No module named 'pyvips'
Even installed latest python:
C:\Users\maja>python
Python 3.11.1 (tags/v3.11.1:a7a450f, Dec 6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Even installed vips-dev-8.13
Is it a 32/64 bit problem?
For some reason, which was not working yesterday, pyvips does install!?
C:\Data\techtime\Houston>pip install pyvips
Collecting pyvips
Using cached pyvips-2.2.1.tar.gz (633 kB)
Preparing metadata (setup.py) ... done
Collecting cffi>=1.0.0
Using cached cffi-1.15.1-cp311-cp311-win_amd64.whl (179 kB)
Collecting pycparser
Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Installing collected packages: pycparser, cffi, pyvips
DEPRECATION: pyvips is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for pyvips ... done
Successfully installed cffi-1.15.1 pycparser-2.21 pyvips-2.2.1
Using proposed PATH include:
import os
add_dll_dir = getattr(os, "add_dll_directory", None)
vipsbin = r"c:\vips-dev-8.13\bin" # LibVIPS binary dir
if callable(add_dll_dir):
add_dll_dir(vipsbin)
else:
os.environ["PATH"] = os.pathsep.join((vipsbin, os.environ["PATH"]))
import pyvips as py
Now I get:
Traceback (most recent call last):
File "C:\Users\maja\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyvips\__init__.py", line 19, in <module>
import _libvips
ModuleNotFoundError: No module named '_libvips'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Data\techtime\Houston\houston-compare-v2.py", line 15, in <module>
import pyvips as py
File "C:\Users\maja\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyvips\__init__.py", line 70, in <module>
gobject_lib = ffi.dlopen(_gobject_libname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\maja\AppData\Local\Programs\Python\Python311\Lib\site-packages\cffi\api.py", line 150, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\maja\AppData\Local\Programs\Python\Python311\Lib\site-packages\cffi\api.py", line 832, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\maja\AppData\Local\Programs\Python\Python311\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'
Guess what's the solution: uninstalled python and installed v 3.6.8, then pyvips >>> works!