Python 安装faiss失败

时间:2024-04-25 11:04:08

报错

遇到ModuleNotFoundError: No module named 'faiss',使用下面语句安装失败。

pip3 install faiss 

遇到

ERROR: Could not find a version that satisfies the requirement faiss (from versions: none)

ERROR: No matching distribution found for faiss

解决方法

pip3  install faiss-cpu
Collecting faiss-cpu
  Downloading faiss_cpu-1.8.0-cp312-cp312-macosx_10_14_x86_64.whl.metadata (3.6 kB)
Requirement already satisfied: numpy in /Users/rsun/miniconda3/lib/python3.12/site-packages (from faiss-cpu) (1.26.4)
Downloading faiss_cpu-1.8.0-cp312-cp312-macosx_10_14_x86_64.whl (7.4 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.4/7.4 MB 10.6 MB/s eta 0:00:00
Installing collected packages: faiss-cpu
Successfully installed faiss-cpu-1.8.0