$ sudo pip install faiss-gpu --default-timeout=1000 -i https://pypi.douban.com/simple
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
WARNING: The directory '/home/wohu/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Looking in indexes: https://pypi.douban.com/simple
Collecting faiss-gpu
Downloading https://pypi.doubanio.com/packages/63/15/289ecf5d23f209c4c6f2f5f4db1d2b4a2be22d1fc49619354363e9367c19/faiss-gpu-1.7.0.tar.gz (34 kB)
WARNING: Generating metadata for package faiss-gpu produced metadata for project name faiss-cpu. Fix your #egg=faiss-gpu fragments.
Building wheels for collected packages: faiss-cpu, faiss-cpu
Building wheel for faiss-cpu (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0]='"'"'/tmp/pip-install-0Cug24/faiss-gpu/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0Cug24/faiss-gpu/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/pip-wheel-LLB0a7
cwd: /tmp/pip-install-0Cug24/faiss-gpu/
Complete output (67 lines):
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 -o faiss/faiss/python/swigfaiss_wrap.cpp faiss/faiss/python/swigfaiss.i
faiss/faiss/python/swigfaiss.i:241: Error: Unable to find 'faiss/impl/platform_macros.h'
faiss/faiss/python/swigfaiss.i:245: Error: Unable to find 'faiss/utils/ordered_key_value.h'
faiss/faiss/python/swigfaiss.i:246: Error: Unable to find 'faiss/utils/Heap.h'
faiss/faiss/python/swigfaiss.i:251: Error: Unable to find 'faiss/utils/AlignedTable.h'
faiss/faiss/python/swigfaiss.i:252: Error: Unable to find 'faiss/utils/partitioning.h'
faiss/faiss/python/swigfaiss.i:253: Error: Unable to find 'faiss/utils/hamming.h'
faiss/faiss/python/swigfaiss.i:356: Error: Unable to find 'faiss/utils/utils.h'
faiss/faiss/python/swigfaiss.i:357: Error: Unable to find 'faiss/utils/distances.h'
faiss/faiss/python/swigfaiss.i:358: Error: Unable to find 'faiss/utils/random.h'
faiss/faiss/python/swigfaiss.i:360: Error: Unable to find 'faiss/MetricType.h'
faiss/faiss/python/swigfaiss.i:363: Error: Unable to find 'faiss/Index.h'
faiss/faiss/python/swigfaiss.i:364: Error: Unable to find 'faiss/Clustering.h'
faiss/faiss/python/swigfaiss.i:366: Error: Unable to find 'faiss/utils/extra_distances.h'
faiss/faiss/python/swigfaiss.i:370: Error: Unable to find 'faiss/impl/ProductQuantizer.h'
faiss/faiss/python/swigfaiss.i:372: Error: Unable to find 'faiss/VectorTransform.h'
faiss/faiss/python/swigfaiss.i:373: Error: Unable to find 'faiss/IndexPreTransform.h'
faiss/faiss/python/swigfaiss.i:374: Error: Unable to find 'faiss/IndexFlat.h'
faiss/faiss/python/swigfaiss.i:375: Error: Unable to find 'faiss/IndexRefine.h'
faiss/faiss/python/swigfaiss.i:376: Error: Unable to find 'faiss/IndexLSH.h'
faiss/faiss/python/swigfaiss.i:377: Error: Unable to find 'faiss/impl/PolysemousTraining.h'
faiss/faiss/python/swigfaiss.i:378: Error: Unable to find 'faiss/IndexPQ.h'
faiss/faiss/python/swigfaiss.i:379: Error: Unable to find 'faiss/impl/io.h'
faiss/faiss/python/swigfaiss.i:381: Error: Unable to find 'faiss/invlists/InvertedLists.h'
faiss/faiss/python/swigfaiss.i:382: Error: Unable to find 'faiss/invlists/InvertedListsIOHook.h'
faiss/faiss/python/swigfaiss.i:384: Error: Unable to find 'faiss/invlists/BlockInvertedLists.h'
faiss/faiss/python/swigfaiss.i:385: Error: Unable to find 'faiss/invlists/DirectMap.h'
faiss/faiss/python/swigfaiss.i:388: Error: Unable to find 'faiss/IndexIVF.h'
faiss/faiss/python/swigfaiss.i:393: Error: Unable to find 'faiss/IVFlib.h'
faiss/faiss/python/swigfaiss.i:394: Error: Unable to find 'faiss/impl/ScalarQuantizer.h'
faiss/faiss/python/swigfaiss.i:395: Error: Unable to find 'faiss/IndexScalarQuantizer.h'
faiss/faiss/python/swigfaiss.i:396: Error: Unable to find 'faiss/IndexIVFSpectralHash.h'
faiss/faiss/python/swigfaiss.i:397: Error: Unable to find 'faiss/impl/HNSW.h'
faiss/faiss/python/swigfaiss.i:398: Error: Unable to find 'faiss/IndexHNSW.h'
faiss/faiss/python/swigfaiss.i:399: Error: Unable to find 'faiss/IndexIVFFlat.h'
faiss/faiss/python/swigfaiss.i:404: Error: Unable to find 'faiss/invlists/OnDiskInvertedLists.h'
faiss/faiss/python/swigfaiss.i:407: Error: Unable to find 'faiss/impl/lattice_Zn.h'
faiss/faiss/python/swigfaiss.i:408: Error: Unable to find 'faiss/IndexLattice.h'
faiss/faiss/python/swigfaiss.i:411: Error: Unable to find 'faiss/IndexIVFPQ.h'
faiss/faiss/python/swigfaiss.i:412: Error: Unable to find 'faiss/IndexIVFPQR.h'
faiss/faiss/python/swigfaiss.i:413: Error: Unable to find 'faiss/Index2Layer.h'
faiss/faiss/python/swigfaiss.i:415: Error: Unable to find 'faiss/IndexPQFastScan.h'
faiss/faiss/python/swigfaiss.i:416: Error: Unable to find 'faiss/IndexIVFPQFastScan.h'
faiss/faiss/python/swigfaiss.i:417: Error: Unable to find 'faiss/utils/quantize_lut.h'
faiss/faiss/python/swigfaiss.i:419: Error: Unable to find 'faiss/IndexBinary.h'
faiss/faiss/python/swigfaiss.i:420: Error: Unable to find 'faiss/IndexBinaryFlat.h'
faiss/faiss/python/swigfaiss.i:421: Error: Unable to find 'faiss/IndexBinaryIVF.h'
faiss/faiss/python/swigfaiss.i:422: Error: Unable to find 'faiss/IndexBinaryFromFloat.h'
faiss/faiss/python/swigfaiss.i:423: Error: Unable to find 'faiss/IndexBinaryHNSW.h'
faiss/faiss/python/swigfaiss.i:424: Error: Unable to find 'faiss/IndexBinaryHash.h'
faiss/faiss/python/swigfaiss.i:426: Error: Unable to find 'faiss/impl/ThreadedIndex.h'
faiss/faiss/python/swigfaiss.i:430: Error: Unable to find 'faiss/IndexShards.h'
faiss/faiss/python/swigfaiss.i:434: Error: Unable to find 'faiss/IndexReplicas.h'
faiss/faiss/python/swigfaiss.i:438: Error: Unable to find 'faiss/MetaIndexes.h'
faiss/faiss/python/swigfaiss.i:453: Error: Unable to find 'faiss/impl/AuxIndexStructures.h'
faiss/faiss/python/swigfaiss.i:639: Error: Unable to find 'faiss/index_io.h'
faiss/faiss/python/swigfaiss.i:640: Error: Unable to find 'faiss/clone_index.h'
faiss/faiss/python/swigfaiss.i:644: Error: Unable to find 'faiss/AutoTune.h'
faiss/faiss/python/swigfaiss.i:645: Error: Unable to find 'faiss/index_factory.h'
faiss/faiss/python/swigfaiss.i:646: Error: Unable to find 'faiss/MatrixStats.h'
error: command 'swig' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0]='"'"'/tmp/pip-install-0Cug24/faiss-gpu/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0Cug24/faiss-gpu/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-VqF7S3/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python2.7/faiss-cpu Check the logs for full command output.
WARNING: You are using pip version 20.1.1; however, version 20.3.4 is available.
You should consider upgrading via the '/usr/bin/python -m pip install --upgrade pip' command.
python2 安装faiss-gpu 报错 faiss/faiss/python/swigfaiss.i:241: Error: Unable to find ‘faiss/impl/platfo
1. 安装报错$ sudo pip install faiss-gpu --default-timeout=1000 -i https://pypi.douban.com/simpleDEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop su