facebookresearch/faiss

Install Error,

Closed this issue · 1 comments

Summary

Platform

OS:

Faiss version:

Installed from:

Faiss compilation options:

Running on:

  • [* ] CPU
  • GPU

Interface:

  • C++
  • [* ] Python

Reproduction instructions

I was trying to install faiss-cpu, and it reported unknown option "-doxygen". Then I think my swig is too old, so I updated to 4.3, After that, I retry to install faiss-cpu, and got the error. I am not sure if it is the problem of swig or faiss, how can I fix it?

pip3 install faiss-cpu
Collecting faiss-cpu
Using cached https://files.pythonhosted.org/packages/ac/a2/9f652d142cc3b70db10621d688dbd8ead162a74b7e0c8d7dda315c52ae4e/faiss-cpu-1.7.4.tar.gz
Building wheels for collected packages: faiss-cpu
Running setup.py bdist_wheel for faiss-cpu ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-1b8y7tuc/faiss-cpu/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/tmpctj40np0pip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
running build_ext
building 'faiss._swigfaiss' extension
swigging faiss/faiss/python/swigfaiss.i to faiss/faiss/python/swigfaiss_wrap.cpp
swig -python -c++ -Doverride= -I/usr/local/include -Ifaiss -doxygen -DSWIGWORDSIZE64 -module swigfaiss -o faiss/faiss/python/swigfaiss_wrap.cpp faiss/faiss/python/swigfaiss.i
faiss/faiss/python/swigfaiss.i:268: Error: Unable to find 'faiss/impl/platform_macros.h'
faiss/faiss/python/swigfaiss.i:272: Error: Unable to find 'faiss/utils/ordered_key_value.h'
faiss/faiss/python/swigfaiss.i:273: Error: Unable to find 'faiss/utils/Heap.h'
faiss/faiss/python/swigfaiss.i:278: Error: Unable to find 'faiss/utils/AlignedTable.h'
faiss/faiss/python/swigfaiss.i:279: Error: Unable to find 'faiss/utils/partitioning.h'
faiss/faiss/python/swigfaiss.i:280: Error: Unable to find 'faiss/utils/hamming.h'
faiss/faiss/python/swigfaiss.i:281: Error: Unable to find 'faiss/utils/hamming_distance/common.h'
faiss/faiss/python/swigfaiss.i:386: Error: Unable to find 'faiss/utils/utils.h'
faiss/faiss/python/swigfaiss.i:387: Error: Unable to find 'faiss/utils/distances.h'
faiss/faiss/python/swigfaiss.i:388: Error: Unable to find 'faiss/utils/random.h'
faiss/faiss/python/swigfaiss.i:389: Error: Unable to find 'faiss/utils/sorting.h'
faiss/faiss/python/swigfaiss.i:391: Error: Unable to find 'faiss/MetricType.h'
faiss/faiss/python/swigfaiss.i:396: Error: Unable to find 'faiss/Index.h'
faiss/faiss/python/swigfaiss.i:398: Error: Unable to find 'faiss/impl/DistanceComputer.h'
faiss/faiss/python/swigfaiss.i:401: Error: Unable to find 'faiss/IndexFlatCodes.h'
faiss/faiss/python/swigfaiss.i:402: Error: Unable to find 'faiss/IndexFlat.h'
faiss/faiss/python/swigfaiss.i:403: Error: Unable to find 'faiss/Clustering.h'
faiss/faiss/python/swigfaiss.i:405: Error: Unable to find 'faiss/utils/extra_distances.h'
faiss/faiss/python/swigfaiss.i:409: Error: Unable to find 'faiss/impl/Quantizer.h'
faiss/faiss/python/swigfaiss.i:410: Error: Unable to find 'faiss/impl/ProductQuantizer.h'
faiss/faiss/python/swigfaiss.i:411: Error: Unable to find 'faiss/impl/AdditiveQuantizer.h'
faiss/faiss/python/swigfaiss.i:412: Error: Unable to find 'faiss/impl/ResidualQuantizer.h'
faiss/faiss/python/swigfaiss.i:413: Error: Unable to find 'faiss/impl/LocalSearchQuantizer.h'
faiss/faiss/python/swigfaiss.i:414: Error: Unable to find 'faiss/impl/ProductAdditiveQuantizer.h'
faiss/faiss/python/swigfaiss.i:415: Error: Unable to find 'faiss/impl/CodePacker.h'
faiss/faiss/python/swigfaiss.i:417: Error: Unable to find 'faiss/VectorTransform.h'
faiss/faiss/python/swigfaiss.i:418: Error: Unable to find 'faiss/IndexPreTransform.h'
faiss/faiss/python/swigfaiss.i:419: Error: Unable to find 'faiss/IndexRefine.h'
faiss/faiss/python/swigfaiss.i:420: Error: Unable to find 'faiss/IndexLSH.h'
faiss/faiss/python/swigfaiss.i:421: Error: Unable to find 'faiss/impl/PolysemousTraining.h'
faiss/faiss/python/swigfaiss.i:422: Error: Unable to find 'faiss/IndexPQ.h'
faiss/faiss/python/swigfaiss.i:423: Error: Unable to find 'faiss/IndexAdditiveQuantizer.h'
faiss/faiss/python/swigfaiss.i:424: Error: Unable to find 'faiss/impl/io.h'
faiss/faiss/python/swigfaiss.i:426: Error: Unable to find 'faiss/invlists/InvertedLists.h'
faiss/faiss/python/swigfaiss.i:427: Error: Unable to find 'faiss/invlists/InvertedListsIOHook.h'
faiss/faiss/python/swigfaiss.i:429: Error: Unable to find 'faiss/invlists/BlockInvertedLists.h'
faiss/faiss/python/swigfaiss.i:430: Error: Unable to find 'faiss/invlists/DirectMap.h'
faiss/faiss/python/swigfaiss.i:431: Error: Unable to find 'faiss/IndexIVF.h'
faiss/faiss/python/swigfaiss.i:436: Error: Unable to find 'faiss/IVFlib.h'
faiss/faiss/python/swigfaiss.i:437: Error: Unable to find 'faiss/impl/ScalarQuantizer.h'
faiss/faiss/python/swigfaiss.i:438: Error: Unable to find 'faiss/IndexScalarQuantizer.h'
faiss/faiss/python/swigfaiss.i:439: Error: Unable to find 'faiss/IndexIVFSpectralHash.h'
faiss/faiss/python/swigfaiss.i:440: Error: Unable to find 'faiss/IndexIVFAdditiveQuantizer.h'
faiss/faiss/python/swigfaiss.i:441: Error: Unable to find 'faiss/impl/HNSW.h'
faiss/faiss/python/swigfaiss.i:442: Error: Unable to find 'faiss/IndexHNSW.h'
faiss/faiss/python/swigfaiss.i:444: Error: Unable to find 'faiss/impl/kmeans1d.h'
faiss/faiss/python/swigfaiss.i:447: Error: Unable to find 'faiss/impl/NNDescent.h'
faiss/faiss/python/swigfaiss.i:448: Error: Unable to find 'faiss/IndexNNDescent.h'
faiss/faiss/python/swigfaiss.i:450: Error: Unable to find 'faiss/IndexIVFFlat.h'
faiss/faiss/python/swigfaiss.i:451: Error: Unable to find 'faiss/impl/NSG.h'
faiss/faiss/python/swigfaiss.i:452: Error: Unable to find 'faiss/IndexNSG.h'
faiss/faiss/python/swigfaiss.i:457: Error: Unable to find 'faiss/invlists/OnDiskInvertedLists.h'
faiss/faiss/python/swigfaiss.i:460: Error: Unable to find 'faiss/impl/lattice_Zn.h'
faiss/faiss/python/swigfaiss.i:461: Error: Unable to find 'faiss/IndexLattice.h'
faiss/faiss/python/swigfaiss.i:464: Error: Unable to find 'faiss/IndexIVFPQ.h'
faiss/faiss/python/swigfaiss.i:465: Error: Unable to find 'faiss/IndexIVFPQR.h'
faiss/faiss/python/swigfaiss.i:466: Error: Unable to find 'faiss/Index2Layer.h'
faiss/faiss/python/swigfaiss.i:468: Error: Unable to find 'faiss/IndexFastScan.h'
faiss/faiss/python/swigfaiss.i:469: Error: Unable to find 'faiss/IndexAdditiveQuantizerFastScan.h'
faiss/faiss/python/swigfaiss.i:470: Error: Unable to find 'faiss/IndexPQFastScan.h'
faiss/faiss/python/swigfaiss.i:471: Error: Unable to find 'faiss/IndexIVFFastScan.h'
faiss/faiss/python/swigfaiss.i:472: Error: Unable to find 'faiss/IndexIVFAdditiveQuantizerFastScan.h'
faiss/faiss/python/swigfaiss.i:473: Error: Unable to find 'faiss/IndexIVFPQFastScan.h'
faiss/faiss/python/swigfaiss.i:474: Error: Unable to find 'faiss/utils/quantize_lut.h'
faiss/faiss/python/swigfaiss.i:476: Error: Unable to find 'faiss/IndexBinary.h'
faiss/faiss/python/swigfaiss.i:477: Error: Unable to find 'faiss/IndexBinaryFlat.h'
faiss/faiss/python/swigfaiss.i:478: Error: Unable to find 'faiss/IndexBinaryIVF.h'
faiss/faiss/python/swigfaiss.i:479: Error: Unable to find 'faiss/IndexBinaryFromFloat.h'
faiss/faiss/python/swigfaiss.i:480: Error: Unable to find 'faiss/IndexBinaryHNSW.h'
faiss/faiss/python/swigfaiss.i:481: Error: Unable to find 'faiss/IndexBinaryHash.h'
faiss/faiss/python/swigfaiss.i:483: Error: Unable to find 'faiss/impl/ThreadedIndex.h'
faiss/faiss/python/swigfaiss.i:487: Error: Unable to find 'faiss/IndexShards.h'
faiss/faiss/python/swigfaiss.i:490: Error: Unable to find 'faiss/IndexShardsIVF.h'
faiss/faiss/python/swigfaiss.i:492: Error: Unable to find 'faiss/IndexReplicas.h'
faiss/faiss/python/swigfaiss.i:496: Error: Unable to find 'faiss/MetaIndexes.h'
faiss/faiss/python/swigfaiss.i:497: Error: Unable to find 'faiss/IndexIDMap.h'
faiss/faiss/python/swigfaiss.i:503: Error: Unable to find 'faiss/IndexRowwiseMinMax.h'
faiss/faiss/python/swigfaiss.i:513: Error: Unable to find 'faiss/impl/AuxIndexStructures.h'
faiss/faiss/python/swigfaiss.i:514: Error: Unable to find 'faiss/impl/IDSelector.h'
faiss/faiss/python/swigfaiss.i:516: Error: Unable to find 'faiss/utils/approx_topk/mode.h'
faiss/faiss/python/swigfaiss.i:753: Error: Unable to find 'faiss/index_io.h'
faiss/faiss/python/swigfaiss.i:754: Error: Unable to find 'faiss/clone_index.h'
faiss/faiss/python/swigfaiss.i:758: Error: Unable to find 'faiss/AutoTune.h'
faiss/faiss/python/swigfaiss.i:759: Error: Unable to find 'faiss/index_factory.h'
faiss/faiss/python/swigfaiss.i:760: Error: Unable to find 'faiss/MatrixStats.h'
error: command 'swig' failed with exit status 1


Failed building wheel for faiss-cpu
Running setup.py clean for faiss-cpu
Failed to build faiss-cpu
Installing collected packages: faiss-cpu
Running setup.py install for faiss-cpu ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-1b8y7tuc/faiss-cpu/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-q9xuqh70-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
/home/journey_ds/.local/lib/python3.6/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
running build
running build_py
running build_ext
building 'faiss._swigfaiss' extension
swigging faiss/faiss/python/swigfaiss.i to faiss/faiss/python/swigfaiss_wrap.cpp
swig -python -c++ -Doverride= -I/usr/local/include -Ifaiss -doxygen -DSWIGWORDSIZE64 -module swigfaiss -o faiss/faiss/python/swigfaiss_wrap.cpp faiss/faiss/python/swigfaiss.i
faiss/faiss/python/swigfaiss.i:268: Error: Unable to find 'faiss/impl/platform_macros.h'
faiss/faiss/python/swigfaiss.i:272: Error: Unable to find 'faiss/utils/ordered_key_value.h'
faiss/faiss/python/swigfaiss.i:273: Error: Unable to find 'faiss/utils/Heap.h'
faiss/faiss/python/swigfaiss.i:278: Error: Unable to find 'faiss/utils/AlignedTable.h'
faiss/faiss/python/swigfaiss.i:279: Error: Unable to find 'faiss/utils/partitioning.h'
faiss/faiss/python/swigfaiss.i:280: Error: Unable to find 'faiss/utils/hamming.h'
faiss/faiss/python/swigfaiss.i:281: Error: Unable to find 'faiss/utils/hamming_distance/common.h'
faiss/faiss/python/swigfaiss.i:386: Error: Unable to find 'faiss/utils/utils.h'
faiss/faiss/python/swigfaiss.i:387: Error: Unable to find 'faiss/utils/distances.h'
faiss/faiss/python/swigfaiss.i:388: Error: Unable to find 'faiss/utils/random.h'
faiss/faiss/python/swigfaiss.i:389: Error: Unable to find 'faiss/utils/sorting.h'
faiss/faiss/python/swigfaiss.i:391: Error: Unable to find 'faiss/MetricType.h'
faiss/faiss/python/swigfaiss.i:396: Error: Unable to find 'faiss/Index.h'
faiss/faiss/python/swigfaiss.i:398: Error: Unable to find 'faiss/impl/DistanceComputer.h'
faiss/faiss/python/swigfaiss.i:401: Error: Unable to find 'faiss/IndexFlatCodes.h'
faiss/faiss/python/swigfaiss.i:402: Error: Unable to find 'faiss/IndexFlat.h'
faiss/faiss/python/swigfaiss.i:403: Error: Unable to find 'faiss/Clustering.h'
faiss/faiss/python/swigfaiss.i:405: Error: Unable to find 'faiss/utils/extra_distances.h'
faiss/faiss/python/swigfaiss.i:409: Error: Unable to find 'faiss/impl/Quantizer.h'
faiss/faiss/python/swigfaiss.i:410: Error: Unable to find 'faiss/impl/ProductQuantizer.h'
faiss/faiss/python/swigfaiss.i:411: Error: Unable to find 'faiss/impl/AdditiveQuantizer.h'
faiss/faiss/python/swigfaiss.i:412: Error: Unable to find 'faiss/impl/ResidualQuantizer.h'
faiss/faiss/python/swigfaiss.i:413: Error: Unable to find 'faiss/impl/LocalSearchQuantizer.h'
faiss/faiss/python/swigfaiss.i:414: Error: Unable to find 'faiss/impl/ProductAdditiveQuantizer.h'
faiss/faiss/python/swigfaiss.i:415: Error: Unable to find 'faiss/impl/CodePacker.h'
faiss/faiss/python/swigfaiss.i:417: Error: Unable to find 'faiss/VectorTransform.h'
faiss/faiss/python/swigfaiss.i:418: Error: Unable to find 'faiss/IndexPreTransform.h'
faiss/faiss/python/swigfaiss.i:419: Error: Unable to find 'faiss/IndexRefine.h'
faiss/faiss/python/swigfaiss.i:420: Error: Unable to find 'faiss/IndexLSH.h'
faiss/faiss/python/swigfaiss.i:421: Error: Unable to find 'faiss/impl/PolysemousTraining.h'
faiss/faiss/python/swigfaiss.i:422: Error: Unable to find 'faiss/IndexPQ.h'
faiss/faiss/python/swigfaiss.i:423: Error: Unable to find 'faiss/IndexAdditiveQuantizer.h'
faiss/faiss/python/swigfaiss.i:424: Error: Unable to find 'faiss/impl/io.h'
faiss/faiss/python/swigfaiss.i:426: Error: Unable to find 'faiss/invlists/InvertedLists.h'
faiss/faiss/python/swigfaiss.i:427: Error: Unable to find 'faiss/invlists/InvertedListsIOHook.h'
faiss/faiss/python/swigfaiss.i:429: Error: Unable to find 'faiss/invlists/BlockInvertedLists.h'
faiss/faiss/python/swigfaiss.i:430: Error: Unable to find 'faiss/invlists/DirectMap.h'
faiss/faiss/python/swigfaiss.i:431: Error: Unable to find 'faiss/IndexIVF.h'
faiss/faiss/python/swigfaiss.i:436: Error: Unable to find 'faiss/IVFlib.h'
faiss/faiss/python/swigfaiss.i:437: Error: Unable to find 'faiss/impl/ScalarQuantizer.h'
faiss/faiss/python/swigfaiss.i:438: Error: Unable to find 'faiss/IndexScalarQuantizer.h'
faiss/faiss/python/swigfaiss.i:439: Error: Unable to find 'faiss/IndexIVFSpectralHash.h'
faiss/faiss/python/swigfaiss.i:440: Error: Unable to find 'faiss/IndexIVFAdditiveQuantizer.h'
faiss/faiss/python/swigfaiss.i:441: Error: Unable to find 'faiss/impl/HNSW.h'
faiss/faiss/python/swigfaiss.i:442: Error: Unable to find 'faiss/IndexHNSW.h'
faiss/faiss/python/swigfaiss.i:444: Error: Unable to find 'faiss/impl/kmeans1d.h'
faiss/faiss/python/swigfaiss.i:447: Error: Unable to find 'faiss/impl/NNDescent.h'
faiss/faiss/python/swigfaiss.i:448: Error: Unable to find 'faiss/IndexNNDescent.h'
faiss/faiss/python/swigfaiss.i:450: Error: Unable to find 'faiss/IndexIVFFlat.h'
faiss/faiss/python/swigfaiss.i:451: Error: Unable to find 'faiss/impl/NSG.h'
faiss/faiss/python/swigfaiss.i:452: Error: Unable to find 'faiss/IndexNSG.h'
faiss/faiss/python/swigfaiss.i:457: Error: Unable to find 'faiss/invlists/OnDiskInvertedLists.h'
faiss/faiss/python/swigfaiss.i:460: Error: Unable to find 'faiss/impl/lattice_Zn.h'
faiss/faiss/python/swigfaiss.i:461: Error: Unable to find 'faiss/IndexLattice.h'
faiss/faiss/python/swigfaiss.i:464: Error: Unable to find 'faiss/IndexIVFPQ.h'
faiss/faiss/python/swigfaiss.i:465: Error: Unable to find 'faiss/IndexIVFPQR.h'
faiss/faiss/python/swigfaiss.i:466: Error: Unable to find 'faiss/Index2Layer.h'
faiss/faiss/python/swigfaiss.i:468: Error: Unable to find 'faiss/IndexFastScan.h'
faiss/faiss/python/swigfaiss.i:469: Error: Unable to find 'faiss/IndexAdditiveQuantizerFastScan.h'
faiss/faiss/python/swigfaiss.i:470: Error: Unable to find 'faiss/IndexPQFastScan.h'
faiss/faiss/python/swigfaiss.i:471: Error: Unable to find 'faiss/IndexIVFFastScan.h'
faiss/faiss/python/swigfaiss.i:472: Error: Unable to find 'faiss/IndexIVFAdditiveQuantizerFastScan.h'
faiss/faiss/python/swigfaiss.i:473: Error: Unable to find 'faiss/IndexIVFPQFastScan.h'
faiss/faiss/python/swigfaiss.i:474: Error: Unable to find 'faiss/utils/quantize_lut.h'
faiss/faiss/python/swigfaiss.i:476: Error: Unable to find 'faiss/IndexBinary.h'
faiss/faiss/python/swigfaiss.i:477: Error: Unable to find 'faiss/IndexBinaryFlat.h'
faiss/faiss/python/swigfaiss.i:478: Error: Unable to find 'faiss/IndexBinaryIVF.h'
faiss/faiss/python/swigfaiss.i:479: Error: Unable to find 'faiss/IndexBinaryFromFloat.h'
faiss/faiss/python/swigfaiss.i:480: Error: Unable to find 'faiss/IndexBinaryHNSW.h'
faiss/faiss/python/swigfaiss.i:481: Error: Unable to find 'faiss/IndexBinaryHash.h'
faiss/faiss/python/swigfaiss.i:483: Error: Unable to find 'faiss/impl/ThreadedIndex.h'
faiss/faiss/python/swigfaiss.i:487: Error: Unable to find 'faiss/IndexShards.h'
faiss/faiss/python/swigfaiss.i:490: Error: Unable to find 'faiss/IndexShardsIVF.h'
faiss/faiss/python/swigfaiss.i:492: Error: Unable to find 'faiss/IndexReplicas.h'
faiss/faiss/python/swigfaiss.i:496: Error: Unable to find 'faiss/MetaIndexes.h'
faiss/faiss/python/swigfaiss.i:497: Error: Unable to find 'faiss/IndexIDMap.h'
faiss/faiss/python/swigfaiss.i:503: Error: Unable to find 'faiss/IndexRowwiseMinMax.h'
faiss/faiss/python/swigfaiss.i:513: Error: Unable to find 'faiss/impl/AuxIndexStructures.h'
faiss/faiss/python/swigfaiss.i:514: Error: Unable to find 'faiss/impl/IDSelector.h'
faiss/faiss/python/swigfaiss.i:516: Error: Unable to find 'faiss/utils/approx_topk/mode.h'
faiss/faiss/python/swigfaiss.i:753: Error: Unable to find 'faiss/index_io.h'
faiss/faiss/python/swigfaiss.i:754: Error: Unable to find 'faiss/clone_index.h'
faiss/faiss/python/swigfaiss.i:758: Error: Unable to find 'faiss/AutoTune.h'
faiss/faiss/python/swigfaiss.i:759: Error: Unable to find 'faiss/index_factory.h'
faiss/faiss/python/swigfaiss.i:760: Error: Unable to find 'faiss/MatrixStats.h'
error: command 'swig' failed with exit status 1

Hi @leizhanggit, pip is not a supported installation method. Additionally, the issue does not provide details on the environment and platform so it's hard for us to make a recommendation for troubleshooting ideas.