背景
windows下安装faiss不成功,报错remove error
解决方案
FAISS 说只有Linux、Mac版本实际上是不准确的,windows没有版本是指无法直接安装faiss。
我们通过曲线救国,安装pytorch附带安装faiss。
安装命令:
conda install -c pytorch/label/nightly faiss-cpu
安装时出现问题:
报错信息:
RemoveError: 'requests' is a dependency of conda and cannot be removed from
conda's operating environment.
解决方案:
conda update -n base -c defaults --force conda
再次如上命令安装faiss,测试一下:
import faiss
报错,信息如下:
ImportError: DLL load failed while importing _swigfaiss: 找不到指定的模块。
升级python版本:
conda install python=3.7
https://github.com/kyamagu/faiss-wheels/issues/45