jupyter-ai: Python 3.12 not supported
Description
Attempting to install Jupyter AI on Python 3.12 is not supported, even though our recipe on conda-forge
merely stipulates python >=3.8
.
The following error occurs when running pip install jupyter_ai
with Python 3.12 on macOS 13.6.3 on an Apple Silicon processor:
...
Using cached yarl-1.9.4-cp312-cp312-macosx_11_0_arm64.whl (79 kB)
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
See also https://github.com/kyamagu/faiss-wheels/issues/87 for the lack of Python 3.12 wheels for faiss-cpu.
About this issue
- Original URL
- State: open
- Created 6 months ago
- Reactions: 2
- Comments: 15 (7 by maintainers)
Progress is being made on this issue. https://github.com/kyamagu/faiss-wheels/pull/88 was merged, meaning that Python 3.12 wheels will be distributed for future
faiss
releases.faiss
will likely have a release in two weeks: https://github.com/facebookresearch/faiss/issues/3263#issuecomment-1966383696. This means that in two weeks’ time, we should be able to bump ourfaiss
dependency and allow for Python 3.12. 🎉Link to upstream issue: https://github.com/kyamagu/faiss-wheels/issues/87
https://github.com/kyamagu/faiss-wheels/issues/87 was completed last week, so once its new version is published, we should be able to add Python 3.12 support.
Quick ping - if I’m reading this correctly, faiss 1.8.0 is now out with the required updates. Would it be possible to push up a release here so we can deploy in 3.12 environments that are conda/mamba-managed? No worries if something else is holding things up, but if not, I’d love to have it more widely available 😃 Thanks team for the great work!
then try to install again
p.s. 2 days ago were merged changes required for successful run on v3.12 python.
p.p.s. for Apple Silicon should be used CPU only version