faiss_prebuilt icon indicating copy to clipboard operation
faiss_prebuilt copied to clipboard

ImportError: No module named '_swigfaiss'

Open fengrk opened this issue 5 years ago • 4 comments

环境: pip install faiss==1.5.3

问题:

当 numpy 版本为1.13.3时,安装faiss后, 执行 faiss会报错ImportError: No module named '_swigfaiss'

解决:

pip uninstall numpy faiss -y
pip install numpy==1.16.2 
pip install faiss

建议: 在依赖文件中指定 numpy 版本

fengrk avatar Apr 22 '19 01:04 fengrk

同样的问题, 然而指定 numpy 版本并不起用, 问题依旧.

zsz00 avatar Jun 21 '19 03:06 zsz00

You also need to have libomp and libopenblas available. On ubuntu you can install these with apt install libopenblas-base libomp-dev

On MacOS: brew install libomp openblas

chinatyc avatar Aug 01 '19 06:08 chinatyc

image

KaizenGirl1111 avatar Apr 16 '22 01:04 KaizenGirl1111

I'm getting an error while installing libomp as suggested by you

KaizenGirl1111 avatar Apr 16 '22 01:04 KaizenGirl1111