module 'faiss' has no attribute 'swigfaiss'
See original GitHub issuepython 3.8.12
autofaiss 2.13.2 pypi_0 pypi
faiss-cpu 1.7.2 pypi_0 pypi
libfaiss 1.7.2 h2bc3f7f_0_cpu pytorch
First of all, thank you for the great project! I get the error: module 'faiss' has no attribute 'swigfaiss'
when running the following command:
import autofaiss
autofaiss.build_index(
"embeddings.npy",
"autofaiss.index",
"autofaiss.json",
metric_type="ip",
should_be_memory_mappable=True,
make_direct_map=True)
The error appears when running it for make_direct_map=True
.
Tested using conda 4.11.0
or mamba 0.15.3
using pytorch
or conda-forge
channel.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
I am getting the below exception when trying to use Faiss 1.5.3
I am getting the below exception when trying to use Faiss 1.5.3. AttributeError: module 'faiss' has no attribute 'IndexFlatL2'. Below is my code...
Read more >module 'faiss._swigfaiss' has no attribute 'delete_floatvector'
AttributeError: module 'faiss.swigfaiss' has no attribute 'deleteFloatVector'. The code I try to run is: import argparse import os import pickle import time ...
Read more >No module named '_swigfaiss' in Windows - Stack Overflow
I have an existing linux python project that uses faiss. The project has the following swigfaiss wrapper as detailed here: ...
Read more >Class faiss::gpu::GpuIndexFlatL2
Flat index does not require IDs as there is no storage available for them. virtual void addImpl_(int n, const float *x, const idx_t...
Read more >faiss问题记录_codebrid的博客
ModuleNotFoundError: No module named 'faiss' ... from .swigfaiss import * ... 关于报错AttributeError: module 'faiss' has no attribute ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the exact same issue. Turns out it was due to both
faiss-cpu
andfaiss-gpu
being installed.With faiss-cpu 1.7.3 (installed via pypi) this issue comes up again and can be reproduced with e.g.
With faiss-cpu 1.7.2 installed it works as expected.