You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble importing pyvips after installing it. I get the following error:
Traceback (most recent call last):
File "/root/miniconda3/envs/valisv2/lib/python3.9/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 "", line 1, in
File "/root/miniconda3/envs/valisv2/lib/python3.9/site-packages/pyvips/init.py", line 48, in
from cffi import FFI
ModuleNotFoundError: No module named 'cffi'
Problem:
pyvips can't find the _libvips and cffi modules. It seems like the installation isn't linking to libvips and cffi correctly.
The text was updated successfully, but these errors were encountered:
Hello, I wouldn't use miniconda. Instead, use the python and libvips that come with your dist, make a venv, and pip install pyvips into that. I see:
john@banana ~ $ python3 -m venv ~/vips
john@banana ~ $ . ~/vips/bin/activate
(vips) john@banana ~ $ pip install pyvips
Requirement already satisfied: pyvips in ./vips/lib/python3.12/site-packages (2.2.3)
Requirement already satisfied: cffi>=1.0.0 in ./vips/lib/python3.12/site-packages (from pyvips) (1.17.1)
Requirement already satisfied: pkgconfig in ./vips/lib/python3.12/site-packages (from pyvips) (1.5.5)
Requirement already satisfied: pycparser in ./vips/lib/python3.12/site-packages (from cffi>=1.0.0->pyvips) (2.22)
(vips) john@banana ~ $ python
Python 3.12.7 (main, Feb 4 2025, 14:46:03) [GCC 14.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyvips
>>>
(~/vips is a prefix in my home directory that's on my PATH)
If you have to use miniconda, I'd guess your install has become a bit messed up. Wipe and reinstall your package area. The miniconda docs might have some helpful info.
Hi,
I'm having trouble importing pyvips after installing it. I get the following error:
Traceback (most recent call last):
File "/root/miniconda3/envs/valisv2/lib/python3.9/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 "", line 1, in
File "/root/miniconda3/envs/valisv2/lib/python3.9/site-packages/pyvips/init.py", line 48, in
from cffi import FFI
ModuleNotFoundError: No module named 'cffi'
Problem:
pyvips can't find the _libvips and cffi modules. It seems like the installation isn't linking to libvips and cffi correctly.
The text was updated successfully, but these errors were encountered: