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: Could not build wheels for faiss-cpu, which is required to install pyproject.toml-based projects in FreeBSD #80

Closed
muktadiur opened this issue Jul 8, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@muktadiur
Copy link

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
@muktadiur muktadiur added the bug Something isn't working label Jul 8, 2023
@kyamagu
Copy link
Owner

kyamagu commented Jul 10, 2023

The build requirement is explicitly stated in the README

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

@kyamagu kyamagu closed this as completed Jul 10, 2023
@Arjun143aish
Copy link

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

@Arjun143aish
Copy link

I installed SWIG too. yet same issue.

@ririzu
Copy link

ririzu commented Nov 24, 2023

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

dlqqq commented Dec 20, 2023

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

@amisamyra99
Copy link

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants