annoy
annoy copied to clipboard
Annoy fails to build on Windows due to Microsoft Visual C++ 14.0
Hi, Annoy installed without any issues on my WSL Ubuntu but when I tried to install it on windows it failed Here's the log
PS > py -3.9 -m pip install annoy
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting annoy
Downloading annoy-1.17.3.tar.gz (647 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 647.5/647.5 kB 13.6 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: annoy
Building wheel for annoy (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for annoy (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-39
creating build\lib.win-amd64-cpython-39\annoy
copying annoy\__init__.py -> build\lib.win-amd64-cpython-39\annoy
copying annoy\__init__.pyi -> build\lib.win-amd64-cpython-39\annoy
copying annoy\py.typed -> build\lib.win-amd64-cpython-39\annoy
running build_ext
building 'annoy.annoylib' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for annoy
Failed to build annoy
ERROR: Could not build wheels for annoy, which is required to install pyproject.toml-based projects
I would try installing VC++14.0 build tools but that is a 6+GB install.
Do you have any suggestions to resolve this? Would it be possible to get pre-built wheels for python 3.9 or 3.10?
Please let me know, thanks!
Hi, where you able to solve the issue, It happened for me too.
Thanks in advance
i installed the vc++ build tools for C++ and other stuff, was annoying but i did eventually build the wheels for 3.9 successfully, they only have pre-built wheels for Python 3.10 macOS 11.0+ ARM64, i tried finding the wheels i built so i could share it with you but i cant find where pip stores them, easiest way would be to just download the vc++ build tools https://visualstudio.microsoft.com/visual-cpp-build-tools/
install the default selection with the Win 10/Win 11 SDK