在win11报ERROR: Could not build wheels for hnswlib, which is required to install pyproject.toml-based

1. Problems

Using langchain in win11, when installing the vector database (pip install Chroma), an error is reported: ERROR: Could not build wheels for hnswlib, which is required to install pyproject.toml-based projects, prompting to Microsoft to install C++ dependencies, after opening the webpage, it will let Download【Visual Studio Installer】. . .
insert image description here
insert image description here

Two, the solution

1. Install dependencies

When an error is reported, it seems that the error of missing C++ dependencies is reported. Just click [Single Component] to install the C++ component. After installation, Chroma still cannot be successfully installed!

If the memory is sufficient, just click [Desktop Development Using C++] to install the relevant C++ dependencies, and then install Chroma after installation. If the memory is not enough, then manually check the components on the right and exclude them by installing them one by one (I didn’t try this step because it takes time!)
insert image description here

2. Install Chroma

After installing the components in the [Desktop Development Using C++] menu, as shown in the figure below, Chroma can be successfully installed.

pip install Chroma

insert image description here

Guess you like

Origin blog.csdn.net/qq_40600379/article/details/131408154