kyamagu / faiss-wheels

Unofficial faiss wheel builder
MIT License
291 stars 38 forks source link

ERROR: Could not build wheels for faiss-cpu, which is required to install pyproject.toml-based projects in FreeBSD #80

Closed muktadiur closed 1 year ago

muktadiur commented 1 year ago

Describe the bug In FreeBSD pip install of faiss-cpu failed building wheel for faiss-cpu

To Reproduce

pip install faiss-cpu

Collecting faiss-cpu Using cached faiss-cpu-1.7.4.tar.gz (57 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done 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 -module swigfaiss -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

Desktop:

kyamagu commented 1 year ago

The build requirement is explicitly stated in the README

For building sdist, swig 3.0.12 or later needs to be available.

Arjun143aish commented 1 year ago

Hi, Am facing same issue. what exactly needs to be sorted? am using python 3.11.3

Arjun143aish commented 1 year ago

I installed SWIG too. yet same issue.

ririzu commented 11 months ago

I had the same issue, I downgraded from python 3.12 to python 3.9 and it worked. I am using visual studio code through anaconda.

dlqqq commented 10 months ago

This error just means that pip is trying to build faiss-cpu on its own because there are no available wheels for your platform. Your platform is a combination of your 1) OS name, 2) CPU architecture, and 3) CPython version.

We can see what wheels are available by looking at this page on PyPI: https://pypi.org/project/faiss-cpu/#files

As you can see, there are no wheels for BSD-likes except macOS, or for CPython 3.12+ (see https://github.com/kyamagu/faiss-wheels/issues/87).

For most people (like @ririzu), the workaround for now is to downgrade to CPython 3.11 or below. Hope this helps! 👋

amisamyra99 commented 10 months ago

This error just means that pip is trying to build faiss-cpu on its own because there are no available wheels for your platform. Your platform is a combination of your 1) OS name, 2) CPU architecture, and 3) CPython version.

We can see what wheels are available by looking at this page on PyPI: https://pypi.org/project/faiss-cpu/#files

As you can see, there are no wheels for BSD-likes except macOS, or for CPython 3.12+ (see #87).

For most people (like @ririzu), the workaround for now is to downgrade to CPython 3.11 or below. Hope this helps! 👋

Thank you that has worked for me

Sahil-Bhoite commented 1 month ago

This error just means that pip is trying to build faiss-cpu on its own because there are no available wheels for your platform. Your platform is a combination of your 1) OS name, 2) CPU architecture, and 3) CPython version.

We can see what wheels are available by looking at this page on PyPI: https://pypi.org/project/faiss-cpu/#files

As you can see, there are no wheels for BSD-likes except macOS, or for CPython 3.12+ (see #87).

For most people (like @ririzu), the workaround for now is to downgrade to CPython 3.11 or below. Hope this helps! 👋

This works for Streamlit too