SillyTavern / SillyTavern-Extras

Extensions API for SillyTavern.
GNU Affero General Public License v3.0
549 stars 124 forks source link

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

Closed opria-arch closed 1 year ago

opria-arch commented 1 year ago

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.

Cohee1207 commented 1 year ago

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

Fixed the error now. Thank you very much!