Hi I just solved this problem by the following steps
Use Conda to get a new vertual env, and use conda in the first place to install conda-forge::faiss-gpu, which you can find out more here https://anaconda.org/conda-forge/faiss-gpu. Most of the problem I met is due to the mix usage of pip and canda. whenever you start to use pip, don't use conda in the same vertual env. It brings me a lot problems.
My cuda version is 12.6 and it also works, I had a pytorch with cuda 12.1
Hope this helps