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
When building with shared objects (-DBUILD_SHARED_LIBS=ON) and python bindings, importing faiss results in failure to import _swigfaiss shared objects following the installation of the resulting wheel.
(8690) ~ $ python -c "import faiss"
ImportError: cannot import name '_swigfaiss' from 'faiss'
There's two issues that causes the above :
The RPATH is incorrect as it points to the build directory which is likely to be removed after installation. It should point to the installation directory.
libfaiss_python_callbacks.so is missing from the wheel.
/home/coulombc/.envs/8690/lib/python3.9/site-packages/faiss/_swigfaiss_avx2.so:
libfaiss_avx2.so => not found
libfaiss_python_callbacks.so => not found
/home/coulombc/.envs/8690/lib/python3.9/site-packages/faiss/_swigfaiss.so:
libfaiss.so => not found
libfaiss_python_callbacks.so => not found
Summary
When building with shared objects (
-DBUILD_SHARED_LIBS=ON
) and python bindings, importing faiss results in failure to import_swigfaiss
shared objects following the installation of the resulting wheel.There's two issues that causes the above :
libfaiss_python_callbacks.so
is missing from the wheel.Platform
OS:
Faiss version: v1.7.1
Installed from: source
Faiss compilation options:
Interface:
Reproduction instructions
The text was updated successfully, but these errors were encountered: