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

pip install annoy erroring on install #672

Open
vasil-valchev opened this issue Oct 21, 2024 · 3 comments
Open

pip install annoy erroring on install #672

vasil-valchev opened this issue Oct 21, 2024 · 3 comments

Comments

@vasil-valchev
Copy link

vasil-valchev commented Oct 21, 2024

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
  ╰─> [26 lines of output]
      c:\Users\...\Desktop\.venv\Lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\annoy
      copying annoy\__init__.py -> build\lib.win-amd64-cpython-311\annoy
      copying annoy\__init__.pyi -> build\lib.win-amd64-cpython-311\annoy
      copying annoy\py.typed -> build\lib.win-amd64-cpython-311\annoy
      running build_ext
      building 'annoy.annoylib' extension
      creating build\temp.win-amd64-cpython-311
      creating build\temp.win-amd64-cpython-311\Release
      creating build\temp.win-amd64-cpython-311\Release\src
      "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD 
"-Ic:\Users\...\Desktop\.venv\include" "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\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.10240.0\ucrt" "-IC:\Program Files (x86)\Microsoft Visual Studio\VC98\atl\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\VC98\mfc\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\VC98\include" /EHsc /Tpsrc/annoymodule.cc /Fobuild\temp.win-amd64-cpython-311\Release\src/annoymodule.obj -D_CRT_SECURE_NO_WARNINGS -fpermissive -DANNOYLIB_MULTITHREADED_BUILD
      cl : Command line warning D9002 : ignoring unknown option '-fpermissive'
      annoymodule.cc
      C:\Program Files (x86)\Microsoft Visual Studio\VC98\include\basetsd.h(79): warning C4302: 'type cast': truncation 
from 'void *' to 'unsigned long'
      C:\Program Files (x86)\Microsoft Visual Studio\VC98\include\basetsd.h(88): warning C4302: 'type cast': truncation 
from 'void *' to 'unsigned long'
      C:\Program Files (x86)\Microsoft Visual Studio\VC98\include\basetsd.h(97): warning C4302: 'type cast': truncation 
from 'void *' to 'unsigned short'
      C:\Program Files (x86)\Microsoft Visual Studio\VC98\include\basetsd.h(106): warning C4302: 'type cast': truncation from 'void *' to 'long'
      C:\Program Files (x86)\Microsoft Visual Studio\VC98\include\basetsd.h(115): warning C4302: 'type cast': truncation from 'void *' to 'short'
      C:\Program Files (x86)\Microsoft Visual Studio\VC98\include\winnt.h(630): fatal error C1189: #error:  Must define 
a target architecture.
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2
      [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)

I have installed C++ build tool 14, but the annoy lib install from python is failing

@tomyputw
Copy link

tomyputw commented Nov 7, 2024

can u fix this problem, i meet the same and there is only Built Distribution for mac

@tomyputw
Copy link

tomyputw commented Nov 7, 2024

now I fix it, just use like:conda install conda-forge::python-annoy
apparently, someone have built the whl

@tomyputw
Copy link

tomyputw commented Nov 7, 2024

if you do not want to use conda download the file name annoy_win_py39_site-packages.7z
there are two fodder in it: annoy-1.17.3.dist-info and annoy
the link last 30 days
https://cowtransfer.com/s/fe3ba26a09c741 dngye2

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