Open felixsh opened 3 months ago
Thanks for sharing this. Just curious, what about removing pytorch::faiss-gpu
in conda dependencies and just let pip alone to handle faiss installation?
Letting pip handle the dependencies results in an error:
ERROR: Could not find a version that satisfies the requirement faiss-gpu>=1.7.2 (from openood) (from versions: none)
ERROR: No matching distribution found for faiss-gpu>=1.7.2
Installing with pip in python3.11 (no conda) produces a similar error. I guess the installation via pip is not intended, to quote the faiss-installation guide: "The supported way to install Faiss is through conda."
Right, turned out that the pypi package expects python >=3.7, <3.11. With as late as python 3.10 the pip installation still works but not with 3.11.
Thanks for the clarification! So, I just missed the correct version.
I will stick with python 3.12 and the solution above for now, that seems to work just fine. From my side this can be closed, only suggestion I have to maybe add this as a note under the installation section.
This was also bugging me and the above solution works in MPS now. So anyone struggling in Mac just remove the fails-gpu to cpu and hopefully this should go through.
I'm trying to install OpenOOD in a conda environment per yaml file, like so:
Building with
conda env create --file=env.yaml
throws an error sayingfaiss-gpu>=1.7.2
can not be satisfied. Changing this tofaiss>=1.7.2
insetup.py
resolves the issue.The problem is probably somewhere between pip and conda. On inspection
conda list | grep faiss --> faiss-gpu
, butpip list | grep faiss --> faiss
and pip can not find thefaiss-gpu
package.Not sure if this needs fixing or is a packaging issue with conda, either way the trinity of
faiss, faiss-cpu, faiss-gpu
is confusing. Maybe this helps somebody else trying to install OpenOOD in a conda env.