I failed to install faiss with conda, so I tried to build from source. I finished compiling the C++ core but failed to compile the python interface
OS: Ubuntu 16.04
Faiss version: master
Faiss compilation options:
Running on:
Interface:
make py
(base) sizhangyu@sizhangyu-750-175se:~/packages/faiss$ make py
make -C python
make[1]: Entering directory '/home/sizhangyu/packages/faiss/python'
python -c++ -Doverride= -I../ -DSWIGWORDSIZE64 -DGPU_WRAPPER -o swigfaiss.cpp s
wigfaiss.swig
File "
++
^
SyntaxError: invalid syntax
Makefile:16: recipe for target 'swigfaiss.cpp' failed
make[1]: [swigfaiss.cpp] Error 1 (ignored)
g++ -std=c++11 -DFINTEGER=int -fopenmp -I/usr/local/cuda-10.1/include -fPIC -m64 -Wno-sign-compare -g -O3 -Wall -Wextra -mpopcnt -msse4 -I
-I../ -c swigfaiss.cpp -o swigfaiss.o
g++: error: swigfaiss.cpp: No such file or directory
g++: fatal error: no input files
compilation terminated.
Makefile:22: recipe for target 'swigfaiss.o' failed
make[1]: * [swigfaiss.o] Error 1
make[1]: Leaving directory '/home/sizhangyu/packages/faiss/python'
Makefile:83: recipe for target 'py' failed
make: * [py] Error 2
I was getting the same error and it turned out I didn't have swig installed. So make sure you have swig installed first.Try sudo apt-get install swig. And then run ./configure again
it works. Thank you!
Most helpful comment
I was getting the same error and it turned out I didn't have swig installed. So make sure you have swig installed first.Try
sudo apt-get install swig. And then run./configureagain