윈도우(Windows) hnswlib 설치 오류 (install error) - Microsoft Visual C++ Build Tools
[ 오류 로그 ]
> pip install -r requirements.txt
...
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: ERROR: Failed to build installable wheels for some pyproject.toml based projects (hnswlib)
[ 해결 ]
1. Visual Studio Build Tools 사이트 접속
https://visualstudio.microsoft.com/visual-cpp-build-tools/
Microsoft C++ Build Tools - Visual Studio
The Microsoft C++ Build Tools provides MSVC toolsets via a scriptable, standalone installer without Visual Studio. Recommended if you build C++ libraries and applications targeting Windows from the command-line (e.g. as part of your continuous integration
visualstudio.microsoft.com
2. [Build Tools 다운로드] 클릭하여 파일 다운로드
다운로드 파일명 : vs_BuildTools.exe
3. 다운로드 파일 실행 (Windows 탐색기에서 다운로드 파일 더블 클릭)
(필요한 파일 다운로드 및 설치 진행)
(Visual Studio Build Tools 설치 관리자 메인 화면)
3.1 상단 [개별 구성 요소] 탭 클릭 후
[SDK, 라이브러리 및 프레임워크] 항목 중
(Windows 11의 경우)
- Windows 11 SDK(10.0.26100.0) 체크 (Windows 11 SDK 중에서 가장 높은 버전 체크)
(Windows 10의 경우)
- Windows 10 SDK(10.0.20348.0) 체크 (Windows 10 SDK 중에서 가장 높은 버전 체크)
3.2 [컴파일러, 빌드 도구 및 런타임] 항목 중
- MSVC v143 - VS 2022 C++ x64/x86 빌드 도구(최신) 체크
3.3 체크한 2가지 구성 요소 설치
[설치] 버튼 클릭
3.4 설치 완료 후 hnswlib 설치 (정상 설치 됨)
[ 참조 ]
ERROR: Could not build wheels for hnswlib, which is required to install pyproject.toml-based projects
I'm trying to install embeddinghub on mac (tried pip3 install embeddinghub and pip3 install pandas embeddinghub protobuf), but I get the same error saying "could not build wheels for hnswlib, ...
stackoverflow.com