babyagi icon indicating copy to clipboard operation
babyagi copied to clipboard

ERROR: Failed building wheel for hnswlib

Open midnightyawn opened this issue 1 year ago • 15 comments

Hi, I am getting these errors when I tried installing it on my MacOs Ventura 13.1. Can anyone pls help me resolving this issue? Thanks in advance!

RuntimeError: Unsupported compiler -- at least C++11 support is needed! [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for hnswlib Failed to build llama-cpp-python hnswlib ERROR: Could not build wheels for llama-cpp-python, hnswlib, which is required to install pyproject.toml-based projects

midnightyawn avatar Apr 23 '23 04:04 midnightyawn

I got the same error with windows 10

Building wheel for hnswlib (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for hnswlib (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [5 lines of output] running bdist_wheel running build running build_ext building 'hnswlib' 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 hnswlib Failed to build hnswlib ERROR: Could not build wheels for hnswlib, which is required to install pyproject.toml-based projects

[notice] A new release of pip available: 22.3.1 -> 23.1 [notice] To update, run: C:\Users\Owner\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip

TunnlMonkey avatar Apr 23 '23 06:04 TunnlMonkey

Yeah, any possible fix to this?

midnightyawn avatar Apr 23 '23 07:04 midnightyawn

I am getting same error on windows 10 and no luck so far

sysads avatar Apr 23 '23 12:04 sysads

On ubuntu you would need to install the build essentials. On Mac xcode-select --install On windows maybe something like this https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 For docker look at this issue: https://github.com/yoheinakajima/babyagi/issues/240

jmtatsch avatar Apr 23 '23 13:04 jmtatsch

I updated python and Visual Code to get past those errors

TunnlMonkey avatar Apr 24 '23 05:04 TunnlMonkey

I had to run the command export HNSWLIB_NO_NATIVE=1 before installing requirements

FaridSafi avatar Apr 24 '23 09:04 FaridSafi

With me, to fix it on Centos, I need install:

sudo yum groupinstall "Development Tools"
sudo yum install gcc cmake boost-devel kernel-devel kernel-headers python39-setuptools python39-pip python39-devel

hoangdd avatar Apr 25 '23 09:04 hoangdd

On Rocky 9 (no GUI) it was enough to run: sudo dnf groupinstall "Development Tools"

BlueTeamByDay avatar Apr 25 '23 13:04 BlueTeamByDay

figured it out on windows 10... make sure to install MS visual studios(https://visualstudio.microsoft.com/vs/) with the c++ package (https://visualstudio.microsoft.com/visual-cpp-build-tools/) and check to make sure python is up to date with command: python --version

mv2woods avatar Apr 29 '23 23:04 mv2woods

I got the same error in Windows 10. I installed MS Visual Studio and the package C++ but still doesn't work.

fuina avatar May 01 '23 15:05 fuina

I got the same error in Windows 10. I installed MS Visual Studio and the package C++ but still doesn't work.

Got the same issue, installed everything from Build Tools... Still nothing.

Plakskekaas420 avatar May 10 '23 08:05 Plakskekaas420

I fixed this on Mac OS by making sure XCode was installed: xcode-select --install

NoahRowlett avatar May 11 '23 00:05 NoahRowlett

I guess some libs were missed. I fixed this through this command:

sudo apt install python3.10-dev

Also take a look at (try install other libs): https://stackoverflow.com/questions/70508775/error-could-not-build-wheels-for-pycairo-which-is-required-to-install-pyprojec

aeft avatar May 16 '23 14:05 aeft

Just install it with conda-forge, not pip. That's all. https://anaconda.org/conda-forge/hnswlib

RidgeRock avatar Jun 01 '23 09:06 RidgeRock

On Ubuntu, running apt install build-essential should do the job.

more-malekpour avatar Jun 02 '23 18:06 more-malekpour