kyamagu / faiss-wheels

Unofficial faiss wheel builder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

muktadiur opened this issue · comments

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:

  • OS: FreeBSD 13.1-RELEASE-p3 GENERIC
  • Architecture: amd64
  • Python: 3.9.16
  • Version: 1.7.4

The build requirement is explicitly stated in the README

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

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

I installed SWIG too. yet same issue.

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.

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 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