You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Mac Monterey系统下farm-haystack搭配FAISS安装问题及解决方案

Mac Monterey下安装farm-haystack搭配FAISS的解决方案

问题1:安装命令执行失败

执行安装命令 pip install 'farm-haystack[docstores,faiss]' 时出现以下错误:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

解决方法:执行命令 xcode-select --install 安装Command Line Tools,之后重新执行安装命令即可。

问题2:导入haystack时初始化错误

运行程序导入haystack时出现错误:

Error #15: Initializing libiomp5.dylib, but found libiomp5.dylib already initialized

解决方法:创建新的conda环境,先执行 conda install nomkl 禁用MKL库,再安装farm-haystack即可解决库冲突问题。

完整操作步骤

  1. 执行命令安装Command Line Tools:xcode-select --install
  2. 创建新的conda环境(示例:conda create -n haystack_env python=3.9)
  3. 激活环境后执行:conda install nomkl
  4. 最后安装farm-haystack:pip install 'farm-haystack[docstores,faiss]'

内容的提问来源于stack exchange,提问作者eboraks

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.12 10:01:16