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】. . .
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!)
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