一. 背景
FAISS向量数据库在1.7.2之后就不能用pip install安装了,需要使用官方推荐方法来安装
二. 安装方法
参考链接:https://github.com/facebookresearch/faiss/blob/main/INSTALL.md
2.1 Conda安装
最方便的方法就是用conda
powershell
conda install -c pytorch -c nvidia faiss-gpu=1.11.0
2.2 源码安装
先从git上下载好source.gz,并解压进入到目录
powershell
cmake -B build . -DEBUILD_TESTING=OFF
make -C build -j faiss
make -C build -j swigfaiss
cd build/faiss/python
python setup.py install