-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
No module named '_swigfaiss' for conda install #485
Comments
This seems to be related to (the lack of) libomp. I'll investigate further. |
@ailzhang Which compiler are you using to build the faiss conda package? I'm guessing some flavor of llvm since it's dynamically linked against libomp. Edit: It seems to be some Homebrew llvm. |
@beauby This indeed solves my problem, thanks a lot! You can close the issue if you think it is appropriate or leave it until the |
Hi @beauby macOS package was built on my old laptop which is already returned. I'm not sure which compiler I used to compile it exactly. |
@ailzhang, any comment? |
Hi @mdman92 Could you try 'from swigfaiss_gpu import *' in $YOUR_CONDA_HOME/lib/pythonx.x/site-packages/faiss? Also could you post conda list result here? |
@ailzhang I followed your instruction but the issue still happen, while I change dir into the
exception showed: During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): conda list show below: ` packages in environment at /Users/hujiaxin/anaconda3: _ipyw_jlab_nb_ext_conf 0.1.0 py36h2fc01ae_0 |
@fooSynaptic Try |
@ailzhang okey, the same exception still occurred. and I can make sure both the llvm and libomp install ed successfully. see below:
During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): |
@fooSynaptic Could you try installing the new version and let me know if this issue still happens? |
I install faiss use "conda install" on a linux machine, I got the same error "ImportError: No module named _swigfaiss" when I import the faiss. How can I solve this issue??? |
I find that the error "ImportError: No module named _swigfaiss" will be disappeared where I use the anaconda3(python3) instead of anaconda2 install faisss. Does the lastest code only support anacoda3 to install??? |
Conda env shouldn't depend on anaconda versions. It's possible that you create a python2 environment in anconda3 solves the issue as well. |
no activity, closing. |
I encountered the same problem. My anaconda version is Anaconda 4.2.0, system is Cents os 7. |
the same problem on linux: Conda: Install: Import Error: I tried |
newer mkl version is required. |
no use |
It should not be so:pip install faiss should do:CPU version onlyconda install faiss-cpu -c pytorch GPU versionconda install faiss-gpu cudatoolkit=8.0 -c pytorch # For CUDA8 link: https://github.com/facebookresearch/faiss/blob/master/INSTALL.md |
conda install mkl=2019.3=199 |
For those who are working with pip and not conda, if you have installed it with,
uninstall it. And then install faiss with,
This worked for me 👍 |
This worked for me.Thank you |
Thanks a lot 👍 |
I met a similar problem, I try hardly to install faiss-cpu on my win10,but it failed again and again.........
|
Have you okay on this problem, could tell me how to solve it, I have the same problem. |
Summary
Platform
OS: macOS 10.13.4
Faiss version:
Faiss compilation options:
Running on :
Reproduction instructions
I installed with
and got
No module named '_swigfaiss'
error. I went into faiss directory and tried to import again, but got the same error message. It is mentioned in the trouble shooting that this error is caused by faiss not being compiled. Since I use conda install, I suppose it is not the case?The text was updated successfully, but these errors were encountered: