Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Failed building wheel for faiss-cpu #15

Open
plsnotracking opened this issue Mar 13, 2024 · 4 comments
Open

ERROR: Failed building wheel for faiss-cpu #15

plsnotracking opened this issue Mar 13, 2024 · 4 comments

Comments

@plsnotracking
Copy link

Hello, trying to setup the project, running into issues.

Previous issues that seem related

Maybe this should be an issue for the upstream library itself.

Maybe these are related?

System Config

  • Running on a M2 Max machine.
  • 64GB RAM
  • MacOS Sonoma 14.4

Steps to repro the error

I have ollama running in a docker container and can be accessed at http://localhost:11434.

# copy the repo
git clone https://github.com/jlonge4/local_llama.git

# root dir
cd local_llama

# check python version
❯ python3 --version
Python 3.12.2

# create a python virtual env
python3 -m venv llama

# activate env
source llama/bin/activate

# fulfill requirements
python3 -m pip install -r requirements.txt

Failure

Error Stacktrace:

Using cached cryptography-42.0.5-cp39-abi3-macosx_10_12_universal2.whl (5.9 MB)
Using cached cffi-1.16.0-cp312-cp312-macosx_11_0_arm64.whl (177 kB)
Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
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 -python -c++ -Doverride= -I/usr/local/include -Ifaiss -doxygen -o faiss/faiss/python/swigfaiss_wrap.cpp faiss/faiss/python/swigfaiss.i
      error: command 'swig' failed: No such file or directory
      [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

Anything that I could do to fix it?

Thank you.

@jlonge4
Copy link
Owner

jlonge4 commented Mar 16, 2024

@plsnotracking Ahhh I see. Perhaps you are onto something with the python version. I have been thinking of making this a docker container so maybe that would resolve it for everyone.

@plsnotracking
Copy link
Author

@jlonge4 anything I can do to help?

@kkose
Copy link

kkose commented Apr 26, 2024

I had the same issue. I created a clean-slate conda environment with python version 3.10 and in that environment the installation worked.

@jlonge4
Copy link
Owner

jlonge4 commented Apr 26, 2024

@kkose @plsnotracking what do you two think about making this project use an in memory document store. Pros: none of these issues. Cons: your document index would only persist for the duration of your app session, and you'd have to reindex each time you ran it. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants