Skip to content

Install fails with python 3.10.2 #529

Closed

Description

@timbmg

Hi, as dependency of pyserini I am installing nmslib. However, the install fails when I use python 3.10.2. I tried with python 3.8.2, and it worked fine. Please find the log below.

pip version: 22.3.1
macos: 12.6.1

Collecting nmslib
  Using cached nmslib-2.1.1.tar.gz (188 kB)
  Preparing metadata (setup.py) ... done
Collecting pybind11<2.6.2
  Using cached pybind11-2.6.1-py2.py3-none-any.whl (188 kB)
Collecting psutil
  Using cached psutil-5.9.4-cp36-abi3-macosx_10_9_x86_64.whl (243 kB)
Collecting numpy>=1.10.0
  Using cached numpy-1.24.1-cp310-cp310-macosx_10_9_x86_64.whl (19.8 MB)
Installing collected packages: pybind11, psutil, numpy, nmslib
  DEPRECATION: nmslib is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for nmslib ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for nmslib did not run successfully.
  │ exit code: 1
  ╰─> [229 lines of output]
      Dependence list: ['pybind11<2.6.2', 'psutil', "numpy>=1.10.0,<1.17 ; python_version=='2.7'", "numpy>=1.10.0 ; python_version>='3.5'"]
      /Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/setuptools/dist.py:717: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
        warnings.warn(
      running install
      running build
      running build_ext
      creating var
      creating var/folders
      creating var/folders/28
      creating var/folders/28/8mjc7pxn5dg0k8h1d7p43yyc0000gn
      creating var/folders/28/8mjc7pxn5dg0k8h1d7p43yyc0000gn/T
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include -I/Users/tim/projects/nlpeer-qa/.venv/include -I/Users/tim/.pyenv/versions/3.10.2/include/python3.10 -c /var/folders/28/8mjc7pxn5dg0k8h1d7p43yyc0000gn/T/tmptsdi0pte.cpp -o var/folders/28/8mjc7pxn5dg0k8h1d7p43yyc0000gn/T/tmptsdi0pte.o -std=c++14
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include -I/Users/tim/projects/nlpeer-qa/.venv/include -I/Users/tim/.pyenv/versions/3.10.2/include/python3.10 -c /var/folders/28/8mjc7pxn5dg0k8h1d7p43yyc0000gn/T/tmpzcaw5hmz.cpp -o var/folders/28/8mjc7pxn5dg0k8h1d7p43yyc0000gn/T/tmpzcaw5hmz.o -fvisibility=hidden
      Extra compilation arguments: ['-O3', '-march=native', '-stdlib=libc++', '-mmacosx-version-min=10.7', '-DVERSION_INFO="2.1.1"', '-std=c++14', '-fvisibility=hidden']
      building 'nmslib' extension
      creating build
      creating build/temp.macosx-12.1-x86_64-3.10
      creating build/temp.macosx-12.1-x86_64-3.10/similarity_search
      creating build/temp.macosx-12.1-x86_64-3.10/similarity_search/src
      creating build/temp.macosx-12.1-x86_64-3.10/similarity_search/src/method
      creating build/temp.macosx-12.1-x86_64-3.10/similarity_search/src/space
      creating build/temp.macosx-12.1-x86_64-3.10/tensorflow
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include -I./similarity_search/include -Itensorflow -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/numpy/core/include -I/Users/tim/projects/nlpeer-qa/.venv/include -I/Users/tim/.pyenv/versions/3.10.2/include/python3.10 -c ./similarity_search/src/distcomp_bregman.cc -o build/temp.macosx-12.1-x86_64-3.10/./similarity_search/src/distcomp_bregman.o -O3 -march=native -stdlib=libc++ -mmacosx-version-min=10.7 -DVERSION_INFO="2.1.1" -std=c++14 -fvisibility=hidden
      ./similarity_search/src/distcomp_bregman.cc:148:17: warning: explicit instantiation of 'ItakuraSaitoPrecompSIMD<float>' that occurs after an explicit specialization has no effect [-Winstantiation-after-specialization]
      template float  ItakuraSaitoPrecompSIMD<float>(const float* pVect1, const float* pVect2, size_t qty);
                      ^
      ./similarity_search/src/distcomp_bregman.cc:80:7: note: previous template specialization is here
      float ItakuraSaitoPrecompSIMD(const float* pVect1, const float* pVect2, size_t qty)
            ^
      ./similarity_search/src/distcomp_bregman.cc:275:16: warning: explicit instantiation of 'KLPrecompSIMD<float>' that occurs after an explicit specialization has no effect [-Winstantiation-after-specialization]
      template float KLPrecompSIMD<float>(const float* pVect1, const float* pVect2, size_t qty);
                     ^
      ./similarity_search/src/distcomp_bregman.cc:214:7: note: previous template specialization is here
      float KLPrecompSIMD(const float* pVect1, const float* pVect2, size_t qty)
            ^
      ./similarity_search/src/distcomp_bregman.cc:395:16: warning: explicit instantiation of 'KLGeneralPrecompSIMD<float>' that occurs after an explicit specialization has no effect [-Winstantiation-after-specialization]
      template float KLGeneralPrecompSIMD<float>(const float* pVect1, const float* pVect2, size_t qty);
                     ^
      ./similarity_search/src/distcomp_bregman.cc:326:7: note: previous template specialization is here
      float KLGeneralPrecompSIMD(const float* pVect1, const float* pVect2, size_t qty)
            ^
      3 warnings generated.
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include -I./similarity_search/include -Itensorflow -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/numpy/core/include -I/Users/tim/projects/nlpeer-qa/.venv/include -I/Users/tim/.pyenv/versions/3.10.2/include/python3.10 -c ./similarity_search/src/distcomp_diverg.cc -o build/temp.macosx-12.1-x86_64-3.10/./similarity_search/src/distcomp_diverg.o -O3 -march=native -stdlib=libc++ -mmacosx-version-min=10.7 -DVERSION_INFO="2.1.1" -std=c++14 -fvisibility=hidden
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include -I./similarity_search/include -Itensorflow -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/numpy/core/include -I/Users/tim/projects/nlpeer-qa/.venv/include -I/Users/tim/.pyenv/versions/3.10.2/include/python3.10 -c ./similarity_search/src/distcomp_edist.cc -o build/temp.macosx-12.1-x86_64-3.10/./similarity_search/src/distcomp_edist.o -O3 -march=native -stdlib=libc++ -mmacosx-version-min=10.7 -DVERSION_INFO="2.1.1" -std=c++14 -fvisibility=hidden
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include -I./similarity_search/include -Itensorflow -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/numpy/core/include -I/Users/tim/projects/nlpeer-qa/.venv/include -I/Users/tim/.pyenv/versions/3.10.2/include/python3.10 -c ./similarity_search/src/distcomp_js.cc -o build/temp.macosx-12.1-x86_64-3.10/./similarity_search/src/distcomp_js.o -O3 -march=native -stdlib=libc++ -mmacosx-version-min=10.7 -DVERSION_INFO="2.1.1" -std=c++14 -fvisibility=hidden
      ./similarity_search/src/distcomp_js.cc:231:16: warning: explicit instantiation of 'JSPrecompSIMDApproxLog<float>' that occurs after an explicit specialization has no effect [-Winstantiation-after-specialization]
      template float JSPrecompSIMDApproxLog<float>(const float* pVect1, const float* pVect2, size_t qty);
                     ^
      ./similarity_search/src/distcomp_js.cc:147:7: note: previous template specialization is here
      float JSPrecompSIMDApproxLog(const float* pVect1, const float* pVect2, size_t qty)
            ^
      1 warning generated.
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include -I./similarity_search/include -Itensorflow -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/numpy/core/include -I/Users/tim/projects/nlpeer-qa/.venv/include -I/Users/tim/.pyenv/versions/3.10.2/include/python3.10 -c ./similarity_search/src/distcomp_l2sqr_sift.cc -o build/temp.macosx-12.1-x86_64-3.10/./similarity_search/src/distcomp_l2sqr_sift.o -O3 -march=native -stdlib=libc++ -mmacosx-version-min=10.7 -DVERSION_INFO="2.1.1" -std=c++14 -fvisibility=hidden
      ./similarity_search/src/distcomp_l2sqr_sift.cc:69:24: warning: variable 'zero' is uninitialized when used here [-Wuninitialized]
        zero = _mm_xor_si128(zero,zero);
                             ^~~~
      ./similarity_search/src/distcomp_l2sqr_sift.cc:68:3: note: variable 'zero' is declared here
        __m128i zero, x1, y1;
        ^
      ./similarity_search/src/distcomp_l2sqr_sift.cc:122:27: warning: variable 'zero' is uninitialized when used here [-Wuninitialized]
        zero = _mm256_xor_si256(zero,zero);
                                ^~~~
      ./similarity_search/src/distcomp_l2sqr_sift.cc:121:3: note: variable 'zero' is declared here
        __m256i zero, x1, y1;
        ^
      2 warnings generated.
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include -I./similarity_search/include -Itensorflow -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/pybind11/include -I/Users/tim/projects/nlpeer-qa/.venv/lib/python3.10/site-packages/numpy/core/include -I/Users/tim/projects/nlpeer-qa/.venv/include -I/Users/tim/.pyenv/versions/3.10.2/include/python3.10 -c ./similarity_search/src/distcomp_lp.cc -o build/temp.macosx-12.1-x86_64-3.10/./similarity_search/src/distcomp_lp.o -O3 -march=native -stdlib=libc++ -mmacosx-version-min=10.7 -DVERSION_INFO="2.1.1" -std=c++14 -fvisibility=hidden
      ./similarity_search/src/distcomp_lp.cc:40:13: error: no matching function for call to 'max'
            res = max(res, fabs(p1[i]-p2[i]));
                  ^~~
      ./similarity_search/src/distcomp_lp.cc:46:16: note: in instantiation of function template specialization 'similarity::LInfNormStandard<float>' requested here
      template float LInfNormStandard<float>(const float *p1, const float *p2, size_t qty);
                     ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:39:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('float' vs. 'double')
      max(const _Tp& __a, const _Tp& __b)
      ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:50:1: note: candidate template ignored: could not match 'initializer_list<type-parameter-0-0>' against 'float'
      max(initializer_list<_Tp> __t, _Compare __comp)
      ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:59:1: note: candidate function not viable: requires single argument '__t', but 2 arguments were provided
      max(initializer_list<_Tp> __t)
      ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:30:1: note: candidate function not viable: requires 3 arguments, but 2 were provided
      max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      ^
      ./similarity_search/src/distcomp_lp.cc:58:15: error: no matching function for call to 'max'
              res = max(res, fabs(*pVect1++ - *pVect2++));
                    ^~~
      ./similarity_search/src/distcomp_lp.cc:71:16: note: in instantiation of function template specialization 'similarity::LInfNorm<float>' requested here
      template float LInfNorm<float>(const float* pVect1, const float* pVect2, size_t qty);
                     ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:39:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('float' vs. 'double')
      max(const _Tp& __a, const _Tp& __b)
      ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:50:1: note: candidate template ignored: could not match 'initializer_list<type-parameter-0-0>' against 'float'
      max(initializer_list<_Tp> __t, _Compare __comp)
      ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:59:1: note: candidate function not viable: requires single argument '__t', but 2 arguments were provided
      max(initializer_list<_Tp> __t)
      ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:30:1: note: candidate function not viable: requires 3 arguments, but 2 were provided
      max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      ^
      ./similarity_search/src/distcomp_lp.cc:59:15: error: no matching function for call to 'max'
              res = max(res, fabs(*pVect1++ - *pVect2++));
                    ^~~
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:39:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('float' vs. 'double')
      max(const _Tp& __a, const _Tp& __b)
      ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:50:1: note: candidate template ignored: could not match 'initializer_list<type-parameter-0-0>' against 'float'
      max(initializer_list<_Tp> __t, _Compare __comp)
      ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:59:1: note: candidate function not viable: requires single argument '__t', but 2 arguments were provided
      max(initializer_list<_Tp> __t)
      ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:30:1: note: candidate function not viable: requires 3 arguments, but 2 were provided
      max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      ^
      ./similarity_search/src/distcomp_lp.cc:60:15: error: no matching function for call to 'max'
              res = max(res, fabs(*pVect1++ - *pVect2++));
                    ^~~
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:39:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('float' vs. 'double')
      max(const _Tp& __a, const _Tp& __b)
      ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:50:1: note: candidate template ignored: could not match 'initializer_list<type-parameter-0-0>' against 'float'
      max(initializer_list<_Tp> __t, _Compare __comp)
      ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:59:1: note: candidate function not viable: requires single argument '__t', but 2 arguments were provided
      max(initializer_list<_Tp> __t)
      ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:30:1: note: candidate function not viable: requires 3 arguments, but 2 were provided
      max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      ^
      ./similarity_search/src/distcomp_lp.cc:61:15: error: no matching function for call to 'max'
              res = max(res, fabs(*pVect1++ - *pVect2++));
                    ^~~
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:39:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('float' vs. 'double')
      max(const _Tp& __a, const _Tp& __b)
      ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:50:1: note: candidate template ignored: could not match 'initializer_list<type-parameter-0-0>' against 'float'
      max(initializer_list<_Tp> __t, _Compare __comp)
      ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:59:1: note: candidate function not viable: requires single argument '__t', but 2 arguments were provided
      max(initializer_list<_Tp> __t)
      ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:30:1: note: candidate function not viable: requires 3 arguments, but 2 were provided
      max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      ^
      ./similarity_search/src/distcomp_lp.cc:65:15: error: no matching function for call to 'max'
              res = max(res, fabs(*pVect1++ - *pVect2++));
                    ^~~
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:39:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('float' vs. 'double')
      max(const _Tp& __a, const _Tp& __b)
      ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:50:1: note: candidate template ignored: could not match 'initializer_list<type-parameter-0-0>' against 'float'
      max(initializer_list<_Tp> __t, _Compare __comp)
      ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:59:1: note: candidate function not viable: requires single argument '__t', but 2 arguments were provided
      max(initializer_list<_Tp> __t)
      ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:30:1: note: candidate function not viable: requires 3 arguments, but 2 were provided
      max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      ^
      ./similarity_search/src/distcomp_lp.cc:141:16: warning: explicit instantiation of 'LInfNormSIMD<float>' that occurs after an explicit specialization has no effect [-Winstantiation-after-specialization]
      template float LInfNormSIMD<float>(const float* pVect1, const float* pVect2, size_t qty);
                     ^
      ./similarity_search/src/distcomp_lp.cc:78:7: note: previous template specialization is here
      float LInfNormSIMD(const float* pVect1, const float* pVect2, size_t qty) {
            ^
      ./similarity_search/src/distcomp_lp.cc:253:16: warning: explicit instantiation of 'L1NormSIMD<float>' that occurs after an explicit specialization has no effect [-Winstantiation-after-specialization]
      template float L1NormSIMD<float>(const float* pVect1, const float* pVect2, size_t qty);
                     ^
      ./similarity_search/src/distcomp_lp.cc:191:7: note: previous template specialization is here
      float L1NormSIMD(const float* pVect1, const float* pVect2, size_t qty) {
            ^
      ./similarity_search/src/distcomp_lp.cc:373:17: warning: explicit instantiation of 'L2NormSIMD<float>' that occurs after an explicit specialization has no effect [-Winstantiation-after-specialization]
      template float  L2NormSIMD<float>(const float* pVect1, const float* pVect2, size_t qty);
                      ^
      ./similarity_search/src/distcomp_lp.cc:368:7: note: previous template specialization is here
      float L2NormSIMD(const float* pVect1, const float* pVect2, size_t qty) {
            ^
      ./similarity_search/src/distcomp_lp.cc:388:12: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
          temp = std::abs(x[i] - y[i]);
                 ^
      ./similarity_search/src/distcomp_lp.cc:395:16: note: in instantiation of function template specialization 'similarity::LPGenericDistance<float>' requested here
      template float LPGenericDistance<float>(const float* x, const float* y, const int length, const float p);
                     ^
      ./similarity_search/src/distcomp_lp.cc:388:12: note: use function 'std::abs' instead
          temp = std::abs(x[i] - y[i]);
                 ^~~~~~~~
                 std::abs
      ./similarity_search/src/distcomp_lp.cc:388:12: note: include the header <cmath> or explicitly provide a declaration for 'std::abs'
      ./similarity_search/src/distcomp_lp.cc:422:16: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
              temp = std::abs(x[i] - y[i]);
                     ^
      ./similarity_search/src/distcomp_lp.cc:449:16: note: in instantiation of function template specialization 'similarity::LPGenericDistanceOptim<float>' requested here
      template float LPGenericDistanceOptim<float>(const float* x, const float* y, const int length, const float p);
                     ^
      ./similarity_search/src/distcomp_lp.cc:422:16: note: use function 'std::abs' instead
              temp = std::abs(x[i] - y[i]);
                     ^~~~~~~~
                     std::abs
      ./similarity_search/src/distcomp_lp.cc:422:16: note: include the header <cmath> or explicitly provide a declaration for 'std::abs'
      ./similarity_search/src/distcomp_lp.cc:428:16: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
              temp = std::abs(x[i] - y[i]);
                     ^
      ./similarity_search/src/distcomp_lp.cc:428:16: note: use function 'std::abs' instead
              temp = std::abs(x[i] - y[i]);
                     ^~~~~~~~
                     std::abs
      ./similarity_search/src/distcomp_lp.cc:428:16: note: include the header <cmath> or explicitly provide a declaration for 'std::abs'
      ./similarity_search/src/distcomp_lp.cc:434:16: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
              temp = std::abs(x[i] - y[i]);
                     ^
      ./similarity_search/src/distcomp_lp.cc:434:16: note: use function 'std::abs' instead
              temp = std::abs(x[i] - y[i]);
                     ^~~~~~~~
                     std::abs
      ./similarity_search/src/distcomp_lp.cc:434:16: note: include the header <cmath> or explicitly provide a declaration for 'std::abs'
      ./similarity_search/src/distcomp_lp.cc:441:14: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
            temp = std::abs(x[i] - y[i]);
                   ^
      ./similarity_search/src/distcomp_lp.cc:441:14: note: use function 'std::abs' instead
            temp = std::abs(x[i] - y[i]);
                   ^~~~~~~~
                   std::abs
      ./similarity_search/src/distcomp_lp.cc:441:14: note: include the header <cmath> or explicitly provide a declaration for 'std::abs'
      8 warnings and 6 errors generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> nmslib

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure. 

Activity

  1. searchivarius commented on Jan 20, 2023

    @searchivarius
    Member

    Hi @timbmg sorry, one more deadline and I will look into this. It's unfortunately due to a debacle with Travis that I cannot make the incremental fixes until I upgrade the deployment process to use something like Github actions.

    @timbmg which platform is this? Intel or M2/M3?

  2. timbmg commented on Jan 20, 2023

    @timbmg
    Author

    Thanks for getting back! No worries, I am using python 3.8.2 meanwhile.

    I am on an Intel i5.

  3. GillesMoyse commented on Feb 5, 2023

    @GillesMoyse

    Hello - I'm also facing the problem, i.e. I can't install it on Windows 64bits using Python 3.10.7.
    When running pip install pyserini, I have the error similar to #464

  4. christian-hentschel commented on Jun 12, 2023

    @christian-hentschel

    Hi @searchivarius - is there any update on this issue? Do you need more information/help? Its currently preventing various projects (e.g. scispacy) to be updated to a more recent python version as it seems. Thanks a lot in advance!

  5. christian-hentschel commented on Jun 13, 2023

    @christian-hentschel

    I take back my last comment to some extend - while the error persists with python 3.11, I can install latest nmslib (using pip install nmslib==2.1.1) in a docker image with python 3.10.12.

  6. searchivarius commented on Dec 2, 2025

    @searchivarius
    Member

    Hi folks,
    We now support binaries all "live" Python versions: 3.8 through 3.13. I will add 3.14 when it becomes more mainstream (currently it's a pre-release version).
    As usual, building from scratch is a bit tricky, but I hope precompiled binaries are solving the problem. Please, let me know if there are any issues.

  7. searchivarius commented on Dec 2, 2025

    @searchivarius
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions