-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named 'faiss.swigfaiss_avx2' #39
Comments
Could be a bad interaction with other imported packages. Try changing the import order in python |
I have a maybe a similar issue both on linux and windows on versions
On linux it proceeds with
On windows the loading of faiss fails completely as discussed in #42. |
Hey, even though #44 mentions this issue as fixed, now I still get (both on windows and linux, python 3.9):
Is that expected behavior? |
Yes, avx2 extenstion is not included in the wheel for maximum
compatibility. You can safely ignore
|
try cd your_python_path/site-packages/faiss
ln -s swigfaiss.py swigfaiss_avx2.py |
Which basically means that faiss will run up to 10 times slower. A couple of years ago we discovered that our production server was not running faiss with AVX2 and had to work our way through debugging faiss and compiling specific avx2-enabled wheels: https://github.com/ckald/faiss-wheels-prophy/ (1.6.5) I think that this almost silent behavior is very bad 🤷 |
@yby9212 your suggestion makes even worse -- you remove the error message and faiss still runs slowly. And nobody will know why |
Feel free to make a PR if you wish to support both plain and avx2 extension in this repository. You can always use the official conda package. They are likely better optimized. |
Doing this still causes some problems because of the artificial linkage |
see faiss install doc: https://github.com/facebookresearch/faiss/blob/main/INSTALL.md and the issue facebookresearch/faiss#2872 . I meet the same problem when i install it via pip install. I uninstall faiss-gpu and re-install with conda again, it solve it. pip is not supported to install Faiss. Please use conda. |
this works perfectly, thank you |
Windows Powershell |
Highly recommended for those who don't use Conda |
Hi,
With faiss-cpu on linux I get an error:
Seems related to other issues, but I'm still not sure of the solution:
facebookresearch/faiss#866
https://github.com/facebookresearch/faiss/issues?q=is%3Aissue+swigfaiss_avx2
The text was updated successfully, but these errors were encountered: