faiss 错误:找不到满足 faiss 要求的版本(来自版本:无)

pre*_*tor 2 python pip python-3.x anaconda faiss

运行安装时:

pip install faiss
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

ERROR: Could not find a version that satisfies the requirement faiss (from versions: none)
ERROR: No matching distribution found for faiss
Run Code Online (Sandbox Code Playgroud)

当我使用 conda 时:

conda install faiss
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

PackagesNotFoundError: The following packages are not available from current channels:

  - faiss
Run Code Online (Sandbox Code Playgroud)

小智 38

只是为了说明显而易见的事实,但对于 pip,您可以使用 gpu 或 cpu 特定的构建:

pip install faiss-cpu
Run Code Online (Sandbox Code Playgroud)

或者

pip install faiss-gpu
Run Code Online (Sandbox Code Playgroud)


Fly*_*ler 6

Pypi 上的 Faiss只是针对 MacOS 和 Linux 的预构建二进制文件的集合,并且仅适用于这些 Python 版本:

Python :: 2.7
Python :: 3.5
Python :: 3.6
Python :: 3.7
Run Code Online (Sandbox Code Playgroud)

您的设置似乎不符合这些规格

对于 conda,它不存在于 std 频道中,但可以通过以下方式安装(仅适用于 Linux 和 MacOS):

conda install -c pytorch faiss-cpu
Run Code Online (Sandbox Code Playgroud)

或者

conda install -c pytorch faiss-gpu
Run Code Online (Sandbox Code Playgroud)

  • 正式它不能在 Windows 上编译,请参阅[github 页面上](https://github.com/facebookresearch/faiss) 上的项目。您可以尝试编译一些[非官方端口](https://github.com/bitsun/faiss-windows),但不能保证它们能够工作,并且也可能使用过时版本的库 (2认同)