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

Installing Annoy issue: error LINK : fatal error LNK1327: failure during running rc.exe #669

Open
ahmedgit-hub opened this issue Sep 2, 2024 · 0 comments

Comments

@ahmedgit-hub
Copy link

ahmedgit-hub commented Sep 2, 2024

I tried multiple solutions, including copying rc.exe and rcdll.dll, also adding Windows Kits path to PATH environment variable, installing MSVC++ v140 toolset for desktop, with no success, any help.

Collecting annoy
  Using cached annoy-1.17.3.tar.gz (647 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: annoy
  Building wheel for annoy (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [245 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.8
      creating build\lib.win-amd64-3.8\annoy
      copying annoy\__init__.py -> build\lib.win-amd64-3.8\annoy
      copying annoy\__init__.pyi -> build\lib.win-amd64-3.8\annoy
      copying annoy\py.typed -> build\lib.win-amd64-3.8\annoy
      running build_ext
      building 'annoy.annoylib' extension
      creating build\temp.win-amd64-3.8
      creating build\temp.win-amd64-3.8\Release
      creating build\temp.win-amd64-3.8\Release\src
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\asha_\appdata\local\programs\python\python38\include -Ic:\users\asha_\appdata\local\programs\python\python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt" /EHsc /Tpsrc/annoymodule.cc /Fobuild\temp.win-amd64-3.8\Release\src/annoymodule.obj -D_CRT_SECURE_NO_WARNINGS -fpermissive -DANNOYLIB_MULTITHREADED_BUILD
      cl : Command line warning D9002 : ignoring unknown option '-fpermissive'
      annoymodule.cc
      src/annoymodule.cc(84): warning C4244: '=': conversion from 'uint64_t' to 'float', possible loss of data
      src/annoymodule.cc(99): warning C4244: 'return': conversion from 'uint64_t' to 'float', possible loss of data
      src/annoymodule.cc(349): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
      src/annoymodule.cc(555): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(980): warning C4267: '+=': conversion from 'size_t' to 'int32_t', possible loss of data
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(958): note: while compiling class template member function 'bool Annoy::AnnoyIndex<int32_t,float,Annoy::DotProduct,Annoy::Kiss64Random,AnnoyIndexThreadedBuildPolicy>::build(int,int,char **)'
      src/annoymodule.cc(165): note: see reference to class template instantiation 'Annoy::AnnoyIndex<int32_t,float,Annoy::DotProduct,Annoy::Kiss64Random,AnnoyIndexThreadedBuildPolicy>' being compiled
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(1374): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(1365): note: while compiling class template member function 'void Annoy::AnnoyIndex<int32_t,float,Annoy::DotProduct,Annoy::Kiss64Random,AnnoyIndexThreadedBuildPolicy>::_get_all_nns(const T *,std::size_t,int,std::vector<S,std::allocator<_Ty>> *,std::vector<T,std::allocator<float>> *) const'
              with
              [
                  T=float,
                  S=int32_t,
                  _Ty=int32_t
              ]
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(1153): note: see reference to function template instantiation 'void Annoy::AnnoyIndex<int32_t,float,Annoy::DotProduct,Annoy::Kiss64Random,AnnoyIndexThreadedBuildPolicy>::_get_all_nns(const T *,std::size_t,int,std::vector<S,std::allocator<_Ty>> *,std::vector<T,std::allocator<float>> *) const' being compiled
              with
              [
                  T=float,
                  S=int32_t,
                  _Ty=int32_t
              ]
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(473): warning C4244: 'return': conversion from 'double' to 'float', possible loss of data
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(1143): note: see reference to function template instantiation 'T Annoy::Angular::distance<S,T>(const Annoy::Angular::Node<S,T> *,const Annoy::Angular::Node<S,T> *,int)' being compiled
              with
              [
                  T=float,
                  S=int32_t
              ]
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(1142): note: while compiling class template member function 'float Annoy::AnnoyIndex<int32_t,float,Annoy::Angular,Annoy::Kiss64Random,AnnoyIndexThreadedBuildPolicy>::get_distance(S,S) const'
              with
              [
                  S=int32_t
              ]
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(1258): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(1255): note: while compiling class template member function 'double Annoy::AnnoyIndex<int32_t,float,Annoy::DotProduct,Annoy::Kiss64Random,AnnoyIndexThreadedBuildPolicy>::_split_imbalance(const std::vector<S,std::allocator<_Ty>> &,const std::vector<_Ty,std::allocator<_Ty>> &)'
              with
              [
                  S=int32_t,
                  _Ty=int32_t
              ]
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(1320): note: see reference to function template instantiation 'double Annoy::AnnoyIndex<int32_t,float,Annoy::DotProduct,Annoy::Kiss64Random,AnnoyIndexThreadedBuildPolicy>::_split_imbalance(const std::vector<S,std::allocator<_Ty>> &,const std::vector<_Ty,std::allocator<_Ty>> &)' being compiled
              with
              [
                  S=int32_t,
                  _Ty=int32_t
              ]
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(593): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(1313): note: see reference to function template instantiation 'bool Annoy::DotProduct::side<S,T,Random>(const Annoy::DotProduct::Node<S,T> *,const T *,int,Random &)' being compiled
              with
              [
                  S=int32_t,
                  T=float,
                  Random=Annoy::Kiss64Random
              ]
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(1262): note: while compiling class template member function 'int32_t Annoy::AnnoyIndex<int32_t,float,Annoy::DotProduct,Annoy::Kiss64Random,AnnoyIndexThreadedBuildPolicy>::_make_tree(const std::vector<S,std::allocator<_Ty>> &,bool,Random &,ThreadedBuildPolicy &)'
              with
              [
                  S=int32_t,
                  _Ty=int32_t,
                  Random=Annoy::Kiss64Random,
                  ThreadedBuildPolicy=AnnoyIndexThreadedBuildPolicy
              ]
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(1208): note: see reference to function template instantiation 'int32_t Annoy::AnnoyIndex<int32_t,float,Annoy::DotProduct,Annoy::Kiss64Random,AnnoyIndexThreadedBuildPolicy>::_make_tree(const std::vector<S,std::allocator<_Ty>> &,bool,Random &,ThreadedBuildPolicy &)' being compiled
              with
              [
                  S=int32_t,
                  _Ty=int32_t,
                  Random=Annoy::Kiss64Random,
                  ThreadedBuildPolicy=AnnoyIndexThreadedBuildPolicy
              ]
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(749): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(1313): note: see reference to function template instantiation 'bool Annoy::Minkowski::side<S,T,Random>(const Annoy::Minkowski::Node<S,T> *,const T *,int,Random &)' being compiled
              with
              [
                  S=int32_t,
                  T=float,
                  Random=Annoy::Kiss64Random
              ]
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(1262): note: while compiling class template member function 'int32_t Annoy::AnnoyIndex<int32_t,float,Annoy::Manhattan,Annoy::Kiss64Random,AnnoyIndexThreadedBuildPolicy>::_make_tree(const std::vector<S,std::allocator<_Ty>> &,bool,Random &,ThreadedBuildPolicy &)'
              with
              [
                  S=int32_t,
                  _Ty=int32_t,
                  Random=Annoy::Kiss64Random,
                  ThreadedBuildPolicy=AnnoyIndexThreadedBuildPolicy
              ]
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(1208): note: see reference to function template instantiation 'int32_t Annoy::AnnoyIndex<int32_t,float,Annoy::Manhattan,Annoy::Kiss64Random,AnnoyIndexThreadedBuildPolicy>::_make_tree(const std::vector<S,std::allocator<_Ty>> &,bool,Random &,ThreadedBuildPolicy &)' being compiled
              with
              [
                  S=int32_t,
                  _Ty=int32_t,
                  Random=Annoy::Kiss64Random,
                  ThreadedBuildPolicy=AnnoyIndexThreadedBuildPolicy
              ]
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(486): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(1313): note: see reference to function template instantiation 'bool Annoy::Angular::side<S,T,Random>(const Annoy::Angular::Node<S,T> *,const T *,int,Random &)' being compiled
              with
              [
                  S=int32_t,
                  T=float,
                  Random=Annoy::Kiss64Random
              ]
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(1262): note: while compiling class template member function 'int32_t Annoy::AnnoyIndex<int32_t,float,Annoy::Angular,Annoy::Kiss64Random,AnnoyIndexThreadedBuildPolicy>::_make_tree(const std::vector<S,std::allocator<_Ty>> &,bool,Random &,ThreadedBuildPolicy &)'
              with
              [
                  S=int32_t,
                  _Ty=int32_t,
                  Random=Annoy::Kiss64Random,
                  ThreadedBuildPolicy=AnnoyIndexThreadedBuildPolicy
              ]
      c:\users\asha_\appdata\local\temp\pip-install-yr8zo9yb\annoy_5d61795cf2bc49129ea28b22ccc5b007\src\annoylib.h(1208): note: see reference to function template instantiation 'int32_t Annoy::AnnoyIndex<int32_t,float,Annoy::Angular,Annoy::Kiss64Random,AnnoyIndexThreadedBuildPolicy>::_make_tree(const std::vector<S,std::allocator<_Ty>> &,bool,Random &,ThreadedBuildPolicy &)' being compiled
              with
              [
                  S=int32_t,
                  _Ty=int32_t,
                  Random=Annoy::Kiss64Random,
                  ThreadedBuildPolicy=AnnoyIndexThreadedBuildPolicy
              ]
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xmemory0(737): warning C4244: 'initializing': conversion from 'unsigned __int64' to 'float', possible loss of data
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xmemory0(857): note: see reference to function template instantiation 'void std::allocator<_Ty>::construct<_Objty,unsigned __int64&>(_Objty *,unsigned __int64 &)' being compiled
              with
              [
                  _Ty=float,
                  _Objty=float
              ]
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xmemory0(857): note: see reference to function template instantiation 'void std::allocator<_Ty>::construct<_Objty,unsigned __int64&>(_Objty *,unsigned __int64 &)' being compiled
              with
              [
                  _Ty=float,
                  _Objty=float
              ]
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xmemory0(996): note: see reference to function template instantiation 'void std::allocator_traits<_Alloc>::construct<_Ty,unsigned __int64&>(std::allocator<_Ty> &,_Objty *,unsigned __int64 &)' being compiled
              with
              [
                  _Alloc=std::allocator<float>,
                  _Ty=float,
                  _Objty=float
              ]
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xmemory0(995): note: see reference to function template instantiation 'void std::allocator_traits<_Alloc>::construct<_Ty,unsigned __int64&>(std::allocator<_Ty> &,_Objty *,unsigned __int64 &)' being compiled
              with
              [
                  _Alloc=std::allocator<float>,
                  _Ty=float,
                  _Objty=float
              ]
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xmemory(225): note: see reference to function template instantiation 'void std::_Wrap_alloc<std::allocator<_Ty>>::construct<_Ty,unsigned __int64&>(_Ty *,unsigned __int64 &)' being compiled
              with
              [
                  _Ty=float
              ]
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xmemory(225): note: see reference to function template instantiation 'void std::_Wrap_alloc<std::allocator<_Ty>>::construct<_Ty,unsigned __int64&>(_Ty *,unsigned __int64 &)' being compiled
              with
              [
                  _Ty=float
              ]
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xmemory(251): note: see reference to function template instantiation '_FwdIt *std::_Uninitialized_copy_al_unchecked1<_InIt,_FwdIt,std::allocator<_Ty>>(_InIt,_InIt,_FwdIt,std::_Wrap_alloc<std::allocator<_Ty>> &,std::_General_ptr_iterator_tag,std::_Any_tag)' being compiled
              with
              [
                  _FwdIt=float *,
                  _InIt=unsigned __int64 *,
                  _Ty=float
              ]
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xmemory(264): note: see reference to function template instantiation '_FwdIt *std::_Uninitialized_copy_al_unchecked<unsigned __int64*,_Iter,std::allocator<_Ty>>(_InIt,_InIt,_FwdIt,std::_Wrap_alloc<std::allocator<_Ty>> &)' being compiled
              with
              [
                  _FwdIt=float *,
                  _Iter=float *,
                  _Ty=float,
                  _InIt=unsigned __int64 *
              ]
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\vector(1653): note: see reference to function template instantiation '_FwdIt *std::_Uninitialized_copy<_Iter,float*,std::allocator<_Ty>>(_InIt,_InIt,_FwdIt,std::_Wrap_alloc<std::allocator<_Ty>> &)' being compiled
              with
              [
                  _FwdIt=float *,
                  _Iter=std::_Vector_iterator<std::_Vector_val<std::_Simple_types<unsigned __int64>>>,
                  _Ty=float,
                  _InIt=std::_Vector_iterator<std::_Vector_val<std::_Simple_types<unsigned __int64>>>
              ]
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\vector(1436): note: see reference to function template instantiation 'float *std::vector<T,std::allocator<_Ty>>::_Ucopy<_Iter>(_Iter,_Iter,float *)' being compiled
              with
              [
                  T=float,
                  _Ty=float,
                  _Iter=std::_Vector_iterator<std::_Vector_val<std::_Simple_types<unsigned __int64>>>
              ]
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\vector(1436): note: see reference to function template instantiation 'float *std::vector<T,std::allocator<_Ty>>::_Ucopy<_Iter>(_Iter,_Iter,float *)' being compiled
              with
              [
                  T=float,
                  _Ty=float,
                  _Iter=std::_Vector_iterator<std::_Vector_val<std::_Simple_types<unsigned __int64>>>
              ]
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\vector(1375): note: see reference to function template instantiation 'void std::vector<T,std::allocator<_Ty>>::_Insert<_Iter>(std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<float>>>,_Iter,_Iter,std::forward_iterator_tag)' being compiled
              with
              [
                  T=float,
                  _Ty=float,
                  _Iter=std::_Vector_iterator<std::_Vector_val<std::_Simple_types<unsigned __int64>>>
              ]
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\vector(1375): note: see reference to function template instantiation 'void std::vector<T,std::allocator<_Ty>>::_Insert<_Iter>(std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<float>>>,_Iter,_Iter,std::forward_iterator_tag)' being compiled
              with
              [
                  T=float,
                  _Ty=float,
                  _Iter=std::_Vector_iterator<std::_Vector_val<std::_Simple_types<unsigned __int64>>>
              ]
      src/annoymodule.cc(104): note: see reference to function template instantiation 'std::_Vector_iterator<std::_Vector_val<std::_Simple_types<float>>> std::vector<T,std::allocator<_Ty>>::insert<std::_Vector_iterator<std::_Vector_val<std::_Simple_types<unsigned __int64>>>>(std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<float>>>,_Iter,_Iter)' being compiled
              with
              [
                  T=float,
                  _Ty=float,
                  _Iter=std::_Vector_iterator<std::_Vector_val<std::_Simple_types<unsigned __int64>>>
              ]
      src/annoymodule.cc(104): note: see reference to function template instantiation 'std::_Vector_iterator<std::_Vector_val<std::_Simple_types<float>>> std::vector<T,std::allocator<_Ty>>::insert<std::_Vector_iterator<std::_Vector_val<std::_Simple_types<unsigned __int64>>>>(std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<float>>>,_Iter,_Iter)' being compiled
              with
              [
                  T=float,
                  _Ty=float,
                  _Iter=std::_Vector_iterator<std::_Vector_val<std::_Simple_types<unsigned __int64>>>
              ]
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\users\asha_\appdata\local\programs\python\python38\libs /LIBPATH:c:\users\asha_\appdata\local\programs\python\python38\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64" /EXPORT:PyInit_annoylib build\temp.win-amd64-3.8\Release\src/annoymodule.obj /OUT:build\lib.win-amd64-3.8\annoy\annoylib.cp38-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.8\Release\src\annoylib.cp38-win_amd64.lib
      annoymodule.obj : warning LNK4197: export 'PyInit_annoylib' specified multiple times; using first specification
         Creating library build\temp.win-amd64-3.8\Release\src\annoylib.cp38-win_amd64.lib and object build\temp.win-amd64-3.8\Release\src\annoylib.cp38-win_amd64.exp
      Generating code
      Finished generating code
      LINK : fatal error LNK1327: failure during running rc.exe
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1327
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for annoy
  Running setup.py clean for annoy
Failed to build annoy
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (annoy)```
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

1 participant