Skip to content

Building wheel for hnswlib (pyproject.toml) did not run successfully - installed Microsoft C++ Build Tools not identified #479

Open
@MilindGaharwar

Description

@MilindGaharwar

For Python 3.10.11 in VSCode in Windows 11, Microsoft Visual C++ 14.0 or greater is installed - Full Visual Studio is installed with C++ components

pip install hnswlib

--gives the following error--

Collecting hnswlib>=0.7 (from chromadb)
Using cached hnswlib-0.7.0.tar.gz (33 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting clickhouse-connect>=0.5.7 (from chromadb)
Using cached clickhouse_connect-0.6.6-cp310-cp310-win_amd64.whl (227 kB)
Requirement already satisfied: sentence-transformers>=2.2.2 in c:\users\1\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from chromadb) (2.2.2)
Collecting duckdb>=0.7.1 (from chromadb)
Using cached duckdb-0.8.1-cp310-cp310-win_amd64.whl (9.8 MB)
Collecting fastapi>=0.85.1 (from chromadb)
Using cached fastapi-0.100.0-py3-none-any.whl (65 kB)
Collecting uvicorn[standard]>=0.18.3 (from chromadb)
Using cached uvicorn-0.22.0-py3-none-any.whl (58 kB)
Requirement already satisfied: numpy>=1.21.6 in c:\users\1\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from chromadb) (1.25.1)
Requirement already satisfied: posthog>=2.4.0 in c:\users\1\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from chromadb) (3.0.1)
Requirement already satisfied: typing-extensions>=4.5.0 in c:\users\1\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from chromadb) (4.7.1)
Requirement already satisfied: certifi in c:\users\1\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from clickhouse-connect>=0.5.7->chromadb) (2023.5.7)
...
Building wheel for hnswlib (pyproject.toml): started
Building wheel for hnswlib (pyproject.toml): finished with status 'error'
Failed to build hnswlib
Note: you may need to restart the kernel to use updated packages.
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...
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
ERROR: Could not build wheels for hnswlib, which is required to install pyproject.toml-based projects

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions