pip、conda安装faiss-cpu,报错及处理
conda安装faiss-cpu报错
操作系统:Win11
Python:3.13.5
conda install -c conda-forge faiss-cpu # CPU版本
conda install -c conda-forge faiss-gpu # GPU版本(需要CUDA)
二、安装及报错1
conda install -c conda-forge faiss-cpu
└─ pin on python 3.13.* =* * is not installable because it requires
└─ python =3.13 *, which conflicts with any installable versions previously reported.
Pins seem to be involved in the conflict. Currently pinned specs:
- python=3.13
这主要是因为最新的faiss支持的python不是最新版本,
python可以安装次新版本,如当前是3.13.5,安装3.12的比较新的版本3.12.7。
二、查看支持的版本
conda search -c conda-forge faiss-cpu --info
faiss-cpu 1.12.0 py3.12_h2e52968_0_cpu
--------------------------------------
file name : faiss-cpu-1.12.0-py3.12_h2e52968_0_cpu.conda
name : faiss-cpu
version : 1.12.0
build : py3.12_h2e52968_0_cpu
build number: 0
size : 1.2 MB
license : MIT
subdir : win-64
url : https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/win-64/faiss-cpu-1.12.0-py3.12_h2e52968_0_cpu.conda
md5 : f7134fc1f3e49e0b30b884fdb3e3d507
timestamp : 2025-08-12 17:11:51 UTC
dependencies:
- libfaiss 1.12.0 py3.12_h2e52968_0_cpu
- mkl 2023.1.0.*
- numpy >=1.19,<2
- numpy >=1.26.4,<2.0a0
- packaging
- python >=3.12,<3.13.0a0
- python_abi 3.12.*
- python_abi 3.12.* *_cp312
- vc >=14.1,<15
- vc14_runtime >=14.16.27033
三、可换为pip安装
pip install faiss-cpu # 社区维护的CPU版本
这个在python 3.13.5下也可以正常安装。
四、报错2
conda install -c conda-forge faiss-cpu
Downloading and Extracting Packages:
Preparing transaction: done
Verifying transaction: failed
CondaVerificationError: The package for libhwloc located at D:\Programs\anaconda3\pkgs\libhwloc-2.12.1-default_h88281d1_1000
appears to be corrupted. The path 'Library/bin/hwloc-diff.exe'
specified in the package manifest cannot be found.
CondaVerificationError: The package for libhwloc located at D:\Programs\anaconda3\pkgs\libhwloc-2.12.1-default_h88281d1_1000
appears to be corrupted. The path 'Library/bin/hwloc-distrib.exe'
specified in the package manifest cannot be found.
CondaVerificationError: The package for libhwloc located at D:\Programs\anaconda3\pkgs\libhwloc-2.12.1-default_h88281d1_1000
appears to be corrupted. The path 'Library/bin/hwloc-gather-cpuid.exe'
specified in the package manifest cannot be found.
CondaVerificationError: The package for libhwloc located at D:\Programs\anaconda3\pkgs\libhwloc-2.12.1-default_h88281d1_1000
appears to be corrupted. The path 'Library/bin/hwloc-patch.exe'
specified in the package manifest cannot be found.
被杀毒软件拦截了,恶意程序,(可考虑临时关闭防护)
conda install -c conda-forge faiss-gpu
不报错
更多推荐
所有评论(0)