Skip to content
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

Can't find headers when trying to use existing binaries #17

Closed
rom1504 opened this issue Jul 7, 2020 · 2 comments
Closed

Can't find headers when trying to use existing binaries #17

rom1504 opened this issue Jul 7, 2020 · 2 comments

Comments

@rom1504
Copy link

rom1504 commented Jul 7, 2020

I'm trying to follow https://github.com/kyamagu/faiss-wheels#linux so I can build my own binaries without AVX2

rom1504@rom1504-W35-37ET:~/faiss$ pip install --no-binary :all: faiss-cpu
Defaulting to user installation because normal site-packages is not writeable
Collecting faiss-cpu
  Using cached faiss-cpu-1.6.3.tar.gz (17 kB)
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from faiss-cpu) (1.16.2)
Skipping wheel build for faiss-cpu, due to binaries being disabled for it.
Installing collected packages: faiss-cpu
    Running setup.py install for faiss-cpu ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ti_pc5up/faiss-cpu/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ti_pc5up/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-record-sq3a3ca8/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/rom1504/.local/include/python3.7m/faiss-cpu                                                                                                                                  
         cwd: /tmp/pip-install-ti_pc5up/faiss-cpu/                                                                                                                          
    Complete output (56 lines):                                                                                                                                             
    running install                                                                                                                                                         
    running build                                                                                                                                                           
    running build_ext                                                                                                                                                       
    building 'faiss._swigfaiss' extension                                                                                                                                   
    swigging python/swigfaiss.i to python/swigfaiss_wrap.cpp                                                                                                                
    swig -python -c++ -Doverride= -I/usr/local/include/faiss -DSWIGWORDSIZE64 -o python/swigfaiss_wrap.cpp python/swigfaiss.i                                               
    python/swigfaiss.i:230: Error: Unable to find 'faiss/utils/Heap.h'                                                                                                      
    python/swigfaiss.i:231: Error: Unable to find 'faiss/utils/hamming.h'                                                                                                   
    python/swigfaiss.i:312: Error: Unable to find 'faiss/utils/utils.h'    

These headers are actually present :

rom1504@rom1504-W35-37ET:~/faiss$ ls /usr/local/include/faiss
AutoTune.h     Index2Layer.h           IndexBinaryHNSW.h  IndexHNSW.h     IndexIVFPQR.h           IndexPreTransform.h     IVFlib.h               utils
clone_index.h  IndexBinaryFlat.h       IndexBinaryIVF.h   index_io.h      IndexIVFSpectralHash.h  IndexReplicas.h         MatrixStats.h          VectorTransform.h
Clustering.h   IndexBinaryFromFloat.h  index_factory.h    IndexIVFFlat.h  IndexLattice.h          IndexScalarQuantizer.h  MetaIndexes.h
DirectMap.h    IndexBinary.h           IndexFlat.h        IndexIVF.h      IndexLSH.h              IndexShards.h           MetricType.h
impl           IndexBinaryHash.h       Index.h            IndexIVFPQ.h    IndexPQ.h               InvertedLists.h         OnDiskInvertedLists.h
rom1504@rom1504-W35-37ET:~/faiss$ ls /usr/local/include/faiss/utils/
distances.h  extra_distances.h  hamming.h  hamming-inl.h  Heap.h  random.h  utils.h  WorkerThread.h

What could be wrong ?

@kyamagu
Copy link
Owner

kyamagu commented Jul 8, 2020

Can you try export FAISS_INCLUDE=/usr/local/include?

@rom1504
Copy link
Author

rom1504 commented Jul 8, 2020

I tried but with no success (same error)
I followed the method you pointed at #15 (comment) and it worked
Again thanks for the help !

@rom1504 rom1504 closed this as completed Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants