使用conda install faiss-cpu -c pytorch安裝faiss的cpu版本後,import faiss,提示這個錯誤
解決方法:
下載facebook上面的faiss repository
在faiss目錄下,運行./configure && make
./configure --without-cuda
make clean
make
然後按官網教程繼續操作即可,要注意的就是make clean,還有就是要打開faiss目錄再編譯!
附官網鏈接:
https://github.com/facebookresearch/faiss/blob/master/INSTALL.md