[GH-ISSUE #40] ERROR: Could not build wheels for hnswlib, which is required to install pyproject.toml-based projects #30

Closed
opened 2026-10-15 18:03:34 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @opria-arch on GitHub (May 30, 2023).
Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Extras/issues/40

When running this command (python -m pip install -r requirements-complete.txt) to open the extension, I received the following error:
Building wheels for collected packages: hnswlib
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

How can I fix this error? I know it's related to pip install at the very least.

Originally created by @opria-arch on GitHub (May 30, 2023). Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Extras/issues/40 When running this command (python -m pip install -r requirements-complete.txt) to open the extension, I received the following error: Building wheels for collected packages: hnswlib 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 How can I fix this error? I know it's related to pip install at the very least.
Author
Owner

@Cohee1207 commented on GitHub (May 30, 2023):

You have two options:

  1. Install C++ build tools (link in your post)
  2. Install hnswlib with conda forge: conda install -c conda-forge hnswlib
<!-- gh-comment-id:1568999660 --> @Cohee1207 commented on GitHub (May 30, 2023): You have two options: 1. Install C++ build tools (link in your post) 2. Install hnswlib with conda forge: conda install -c conda-forge hnswlib
Author
Owner

@opria-arch commented on GitHub (May 30, 2023):

Fixed the error now. Thank you very much!

<!-- gh-comment-id:1569011663 --> @opria-arch commented on GitHub (May 30, 2023): Fixed the error now. Thank you very much!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SillyTavern/SillyTavern-Extras#30
No description provided.