-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
faiss
fails to import on python==3.12 because of deprecated numpy.distutils
#3936
Comments
acked, Nix is not the official supported way of installing faiss. If you need to be unblocked quickly, can you try installing faiss from conda-forge? I will check if https://anaconda.org/anaconda/py-cpuinfo can be used to replace the deprecated module |
I am not a There is no particular urgency don't worry. |
I am also facing this exact same issue using Debian. |
@cachitas is this on x86 or aarch64? |
aarch64 |
This doesn't appear to be aarch64 specific: based on the numpy documentation it applies to all numpy uses in Python 3.12 and newer. |
faiss
fails to import on python==3.12 & aarch64-linux
because of deprecated numpy.distutils
faiss
fails to import on python==3.12 because of deprecated numpy.distutils
i have this issue: Traceback (most recent call last):
File "/home/vboxuser/projects/chatbot-ia/index.py", line 3, in <module>
app = create_app()
^^^^^^^^^^^^
File "/home/vboxuser/projects/chatbot-ia/src/__init__.py", line 9, in create_app
from .routes import rag,db
File "/home/vboxuser/projects/chatbot-ia/src/routes/db.py", line 3, in <module>
import faiss
File "/home/vboxuser/projects/chatbot-ia/env/lib/python3.12/site-packages/faiss/__init__.py", line 16, in <module>
from .loader import *
File "/home/vboxuser/projects/chatbot-ia/env/lib/python3.12/site-packages/faiss/loader.py", line 88, in <module>
instruction_sets = supported_instruction_sets()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vboxuser/projects/chatbot-ia/env/lib/python3.12/site-packages/faiss/loader.py", line 53, in supported_instruction_sets
if is_sve_supported():
^^^^^^^^^^^^^^^^^^
File "/home/vboxuser/projects/chatbot-ia/env/lib/python3.12/site-packages/faiss/loader.py", line 43, in is_sve_supported
import numpy.distutils.cpuinfo
ModuleNotFoundError: No module named 'numpy.distutils' with arm64 |
I have the same issue when trying to use faiss on an arm linux platform and numpy==1.26.0. I think the problematic import |
Summary
To know whether the system supports SVE, faiss uses deprecated
numpy.distutils.cpuinfo
.This has been removed and crashes on Python 3.12 (on
aarch64-linux
systems) with:Platform
OS: NixOS
Faiss version: 1.9.0
Installed from: Nix
Faiss compilation options:
Running on:
Interface:
Reproduction instructions
import faiss
The text was updated successfully, but these errors were encountered: