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

CPython 3.12 wheels #87

Closed
dlqqq opened this issue Dec 20, 2023 · 7 comments
Closed

CPython 3.12 wheels #87

dlqqq opened this issue Dec 20, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@dlqqq
Copy link

dlqqq commented Dec 20, 2023

(cc @kyamagu for visibility)

There are currently no CPython 3.12 wheels on PyPI (https://pypi.org/project/faiss-cpu/#files). This causes an error on platforms using CPython 3.12 which are unable to build faiss-cpu from source.

Can the contributors publish a new minor/patch release that includes CPython 3.12 for all platforms?

Example output, on an M1 Mac running CPython 3.12:

...
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
  ╰─> [12 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
      Traceback (most recent call last):
        File "/opt/miniconda3/envs/jupyter-ai-jl4-pip/bin/swig", line 5, in <module>
          from swig import swig
      ModuleNotFoundError: No module named 'swig'
      error: command '/opt/miniconda3/envs/jupyter-ai-jl4-pip/bin/swig' failed with exit code 1
      [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
@kyamagu
Copy link
Owner

kyamagu commented Dec 21, 2023

The current faiss release does not work for CPython 3.12 due to the deprecation of distutils module.
https://peps.python.org/pep-0632/

Please file a bug in the upsteam faiss repository

@kyamagu
Copy link
Owner

kyamagu commented Jan 5, 2024

Upstream PR facebookresearch/faiss#3191

@Youjin1985
Copy link

And 3.11 as well when possible, please

@kyamagu
Copy link
Owner

kyamagu commented Jan 23, 2024

This PR implements fix for CPython 3.12+. The next release will include the update.

@msdrigg
Copy link

msdrigg commented Feb 19, 2024

Any timeline for release? Even with just this PR many users would benefit.

@msdrigg msdrigg mentioned this issue Feb 19, 2024
@kyamagu
Copy link
Owner

kyamagu commented Feb 20, 2024

@msdrigg Ask for the release schedule in the upstream repository

@dlqqq
Copy link
Author

dlqqq commented Feb 27, 2024

@msdrigg Looks like we can expect a release in 2 weeks: facebookresearch/faiss#3263 (comment)

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

No branches or pull requests

4 participants