[本地部署]: 安装依赖报错 ERROR: Failed building wheel for faiss-cpu
WILDADF opened this issue · comments
WILDADF commented
是否已存在现有反馈与解答?
- 我确认没有已有issue或discussion,且已阅读常见问题。
是否是一个代理配置相关的疑问?
- 我确认这不是一个代理配置相关的疑问。
错误描述
安装依赖报错 ERROR: Failed building wheel for faiss-cpu
复现操作
There are currently no CPython 3.12 wheels on PyPI
downgrade to CPython 3.11 or below
kyamagu/faiss-wheels#80
kyamagu/faiss-wheels#87
错误日志
Building wheels for collected packages: faiss-cpu
Building wheel for faiss-cpu (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for faiss-cpu (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
running bdist_wheel
running build
running build_py
running build_ext
building 'faiss._swigfaiss' extension
swigging faiss\faiss\python\swigfaiss.i to faiss\faiss\python\swigfaiss_wrap.cpp
swig.exe -python -c++ -Doverride= -I/usr/local/include -Ifaiss -doxygen -DSWIGWIN -module swigfaiss -o faiss\faiss\python\swigfaiss_wrap.cpp faiss\faiss\python\swigfaiss.i
error: command 'swig.exe' failed: None
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for faiss-cpu
Failed to build faiss-cpu
ERROR: Could not build wheels for faiss-cpu, which is required to install pyproject.toml-based projects
运行环境
- OS: win10 22H2
- Browser: Chrome 121.0.6167.185
- Gradio version: 3.43.2
- Python version: 3.12.0
补充说明
No response
Chuan Hu commented
你的Python版本(3.12)太新了,建议使用 3.11 或 3.10 版本的Python。我在文档里加一下Python版本的提示。