Cannot install Faiss in Google Collab

Has anyone gotten FAISS index to work in Google Collab (free version)?

I tried following the example mentioned in the doc.

However it throws an error at add_faiss_index() method saying you must install Faiss to use FaissIndex. This is despite the fact that I do

!pip install faiss-cpu
!pip install faiss-gpu
1 Like

You can find the solution to this issue in the Discord thread.