Open Naozumi520 opened 1 year ago
After using conda as the installer, I've succeeded to install faiss. But it made weird errors and the same using conda-forge
(svc01) naozumi@Naozumis-MBP RVC-beta % python infer-web.py
Traceback (most recent call last):
File "infer-web.py", line 7, in <module>
import faiss
File "/usr/local/anaconda3/envs/svc01/lib/python3.8/site-packages/faiss/__init__.py", line 16, in <module>
from .loader import *
File "/usr/local/anaconda3/envs/svc01/lib/python3.8/site-packages/faiss/loader.py", line 65, in <module>
from .swigfaiss import *
File "/usr/local/anaconda3/envs/svc01/lib/python3.8/site-packages/faiss/swigfaiss.py", line 13, in <module>
from . import _swigfaiss
ImportError: dlopen(/usr/local/anaconda3/envs/svc01/lib/python3.8/site-packages/faiss/_swigfaiss.so, 0x0002): Library not loaded: @rpath/libmkl_intel_lp64.1.dylib
Referenced from: <4A025BD7-6F1F-3CD5-B319-DE475BB38238> /usr/local/anaconda3/envs/svc01/lib/libfaiss.dylib
Reason: tried: '/usr/local/anaconda3/envs/svc01/lib/libmkl_intel_lp64.1.dylib' (no such file), '/usr/local/anaconda3/envs/svc01/lib/python3.8/site-packages/faiss/../../../libmkl_intel_lp64.1.dylib' (no such file), '/usr/local/anaconda3/envs/svc01/lib/python3.8/site-packages/faiss/../../../libmkl_intel_lp64.1.dylib' (no such file), '/usr/local/anaconda3/envs/svc01/bin/../lib/libmkl_intel_lp64.1.dylib' (no such file), '/usr/local/anaconda3/envs/svc01/bin/../lib/libmkl_intel_lp64.1.dylib' (no such file), '/usr/local/lib/libmkl_intel_lp64.1.dylib' (no such file), '/usr/lib/libmkl_intel_lp64.1.dylib' (no such file, not in dyld cache)
There is currently an issue with MKL on the Mac. @algoriddle what is the current status?
The same issue happened to me when running on the Mac. I have a M1 chip.
Do you have any updates for MKL on the Mac? @mdouze @algoriddle
Thank you!
+1
+1
+1 - got around this by just conda install -c conda-forge faiss-cpu==1.7.3
in the interim
+1
+1
the same! +1
> sw_vers
ProductName: macOS ProductVersion: 14.2.1 BuildVersion: 23C71
> python --version
Python 3.12.0
> pip --version
pip 23.3.1 from /Users/xxx/.pyenv/versions/3.12.0/lib/python3.12/site-packages/pip (python 3.12)
+1
> pip wheel --no-cache-dir --use-pep517 "faiss-cpu (==1.7.4)"
> sw_vers
ProductName: macOS
ProductVersion: 14.2.1
BuildVersion: 23C71
> python --version
Python 3.12.0
> pip --version
pip 23.3.1 from /Users/xxx/.pyenv/versions/3.12.0/lib/python3.12/site-packages/pip (python 3.12)
There is an open PR https://github.com/facebookresearch/faiss/pull/3191 for an issue using faiss with python 3.12
It worked after changing python to v3.10 and installing FAISS using brew
> brew install faiss --build-from-source
Summary
Cannot install under macOS, throw error during Installation.
Platform
OS: macOS 13.3.1
Faiss version: 1.7.0
Installed from: pip
Faiss compilation options: none
Reproduction instructions
run
pip3 install faiss-cpu==1.7.0
Throw error: