yoheinakajima / babyagi

https://babyagi.org/
20.12k stars 2.63k forks source link

ERROR: Failed building wheel for hnswlib #244

Closed midnightyawn closed 6 days ago

midnightyawn commented 1 year ago

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

TunnlMonkey commented 1 year ago

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

midnightyawn commented 1 year ago

Yeah, any possible fix to this?

sysads commented 1 year ago

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

jmtatsch commented 1 year ago

On ubuntu you would need to install the build essentials. On Macxcode-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

TunnlMonkey commented 1 year ago

I updated python and Visual Code to get past those errors

FaridSafi commented 1 year ago

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

hoangdd commented 1 year ago

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
BlueTeamByDay commented 1 year ago

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

mv2woods commented 1 year ago

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

fuina commented 1 year ago

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

Plakskekaas420 commented 1 year ago

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.

NoahRowlett commented 1 year ago

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

aeft commented 1 year ago

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

RidgeRock commented 1 year ago

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

more-malekpour commented 1 year ago

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