facebookresearch / faiss

A library for efficient similarity search and clustering of dense vectors.

Home Page:https://faiss.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The new Faiss 1.7.3 is not compatible with Python 3.10

urialon opened this issue · comments

Summary

The new Faiss 1.7.3 release is not compatible with Python 3.10

Platform

OS: CentOS

Faiss version: 1.7.3

Installed from: Anaconda, using conda install -c pytorch faiss-gpu==1.7.3

Faiss compilation options:

Running on:

  • CPU
  • GPU

Interface:

  • C++
  • Python

Reproduction instructions

Thank you for releasing the 1.7.3 version!

When running conda install -c pytorch faiss-gpu==1.7.3 inside a Conda environment with Python 3.10, I am getting the following error message:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: | 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                                                                                            
                                                                                                                                                                                                                  
UnsatisfiableError: The following specifications were found                                                                                                                                                       
to be incompatible with the existing python installation in your environment:

Specifications:

  - faiss-gpu==1.7.3 -> python[version='>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0']

Your python: python=3.10

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

I hope not to need to downgrade to Python 3.9, because 3.10 is already >1 year old.
Is there a chance that faiss-gpu 1.7.3 will be supported on python 3.10?

Related: #2431

Pre-packaging with another version of python is not currently in our priorities.
If you need 3.10, I'd recommend compiling yourself, see

https://github.com/facebookresearch/faiss/wiki/Installing-Faiss#compiling-the-python-interface-within-an-anaconda-install

FYI for anyone compiling themselves for python 3.10, on Ubuntu 22.04 I had to add -DBLA_VENDOR=Intel10_64_dyn to the cmake commandline in order to get proper linking with MKL.

We just released 1.7.4 and it supports python 3.10 🥳 @urialon

Great, thanks a lot!