Skip to content

ChromaDB installation problem on Windows (solutions in thread) #250

Closed
@shivamatkearney

Description

@shivamatkearney

CMake Error at C:/Program Files/CMake/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler

"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/Users/sraj03/Desktop/FlaskCWH/sentencepiece/build/CMakeFiles/CMakeScratch/TryCompile-gtv4rs

Run Build Command(s):C:/Program Files/CMake/bin/cmake.exe -E env VERBOSE=1 nmake -f Makefile /nologo cmTC_79b47\fast &&   "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.35.32215\bin\Hostx64\x64\nmake.exe"  -f CMakeFiles\cmTC_79b47.dir\build.make /nologo -L                  CMakeFiles\cmTC_79b47.dir\build
Building C object CMakeFiles/cmTC_79b47.dir/testCCompiler.c.obj
    "C:\Program Files\CMake\bin\cmake.exe" -E cmake_cl_compile_depends --dep-file=CMakeFiles\cmTC_79b47.dir\testCCompiler.c.obj.d --working-dir=C:\Users\sraj03\Desktop\FlaskCWH\sentencepiece\build\CMakeFiles\CMakeScratch\TryCompile-gtv4rs --filter-prefix="Note: including file: " -- C:\PROGRA~2\MICROS~3\2022\BUILDT~1\VC\Tools\MSVC\1435~1.322\bin\Hostx64\x64\cl.exe @C:\Users\sraj03\AppData\Local\Temp\nm3498.tmp
testCCompiler.c
Linking C executable cmTC_79b47.exe
    "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_79b47.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests -- C:\PROGRA~2\MICROS~3\2022\BUILDT~1\VC\Tools\MSVC\1435~1.322\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\cmTC_79b47.dir\objects1.rsp @C:\Users\sraj03\AppData\Local\Temp\nm3787.tmp
Visual Studio Incremental Link with embedded manifests
Create CMakeFiles\cmTC_79b47.dir/manifest.rc
Create empty: CMakeFiles\cmTC_79b47.dir/embed.manifest
RC Pass 1:
rc /fo CMakeFiles\cmTC_79b47.dir/manifest.res CMakeFiles\cmTC_79b47.dir/manifest.rc
RC Pass 1: command "rc /fo CMakeFiles\cmTC_79b47.dir/manifest.res CMakeFiles\cmTC_79b47.dir/manifest.rc" failed (exit code 0) with the following output:
The system cannot find the file specifiedNMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_79b47.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests -- C:\PROGRA~2\MICROS~3\2022\BUILDT~1\VC\Tools\MSVC\1435~1.322\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\cmTC_79b47.dir\objects1.rsp @C:\Users\sraj03\AppData\Local\Temp\nm3787.tmp' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.35.32215\bin\Hostx64\x64\nmake.exe"  -f CMakeFiles\cmTC_79b47.dir\build.make /nologo -L                  CMakeFiles\cmTC_79b47.dir\build' : return code '0x2'
Stop.

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:18 (project)

-- Configuring incomplete, errors occurred!

Activity

jeffchuber

jeffchuber commented on Mar 29, 2023

@jeffchuber
Contributor

@shivamatkearney thanks for reporting this! What version of Windows are you running? What version of Python? Thank you!

shivamatkearney

shivamatkearney commented on Mar 30, 2023

@shivamatkearney
Author

@jeffchuber I am using Windows 11 and Python version 3.11.2

ayush-vibrant

ayush-vibrant commented on Mar 30, 2023

@ayush-vibrant

Facing the same issue on macosx with python 3.9.6
Below is the output of pip install chromadb

Defaulting to user installation because normal site-packages is not writeable
Collecting chromadb
  Using cached chromadb-0.3.14-py3-none-any.whl (45 kB)
Collecting duckdb>=0.7.1
  Downloading duckdb-0.7.1-cp39-cp39-macosx_10_9_x86_64.whl (14.6 MB)
�[K     |████████████████████████████████| 14.6 MB 12.7 MB/s eta 0:00:01   |███████▎                        | 3.3 MB 1.5 MB/s eta 0:00:08
�[?25hRequirement already satisfied: requests>=2.28 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from chromadb) (2.28.2)
Collecting uvicorn[standard]>=0.18.3
  Using cached uvicorn-0.21.1-py3-none-any.whl (57 kB)
Collecting posthog>=2.4.0
  Using cached posthog-2.4.0-py2.py3-none-any.whl (36 kB)
Collecting sentence-transformers>=2.2.2
  Using cached sentence-transformers-2.2.2.tar.gz (85 kB)
Collecting fastapi>=0.85.1
  Using cached fastapi-0.95.0-py3-none-any.whl (57 kB)
Requirement already satisfied: numpy>=1.21.6 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from chromadb) (1.23.5)
Collecting hnswlib>=0.7
  Using cached hnswlib-0.7.0.tar.gz (33 kB)
�[33m  WARNING: Value for prefixed-purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /private/var/folders/pt/5z09lb6n7psd9yl73dgmfzyr0000gq/T/pip-build-env-vg3l1_mn/normal/lib/python3.9/site-packages
  sysconfig: /Library/Python/3.9/site-packages�[0m
�[33m  WARNING: Value for prefixed-platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /private/var/folders/pt/5z09lb6n7psd9yl73dgmfzyr0000gq/T/pip-build-env-vg3l1_mn/normal/lib/python3.9/site-packages
  sysconfig: /Library/Python/3.9/site-packages�[0m
�[33m  WARNING: Additional context:
  user = False
  home = None
  root = None
  prefix = '/private/var/folders/pt/5z09lb6n7psd9yl73dgmfzyr0000gq/T/pip-build-env-vg3l1_mn/normal'�[0m
�[33m  WARNING: Value for prefixed-purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /private/var/folders/pt/5z09lb6n7psd9yl73dgmfzyr0000gq/T/pip-build-env-vg3l1_mn/overlay/lib/python3.9/site-packages
  sysconfig: /Library/Python/3.9/site-packages�[0m
�[33m  WARNING: Value for prefixed-platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /private/var/folders/pt/5z09lb6n7psd9yl73dgmfzyr0000gq/T/pip-build-env-vg3l1_mn/overlay/lib/python3.9/site-packages
  sysconfig: /Library/Python/3.9/site-packages�[0m
�[33m  WARNING: Additional context:
  user = False
  home = None
  root = None
  prefix = '/private/var/folders/pt/5z09lb6n7psd9yl73dgmfzyr0000gq/T/pip-build-env-vg3l1_mn/overlay'�[0m
  Installing build dependencies ... �[?25ldone
�[?25h  Getting requirements to build wheel ... �[?25ldone
�[?25h    Preparing wheel metadata ... �[?25ldone
�[?25hRequirement already satisfied: pandas>=1.3 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from chromadb) (1.5.3)
Collecting clickhouse-connect>=0.5.7
  Downloading clickhouse_connect-0.5.17-cp39-cp39-macosx_10_9_x86_64.whl (235 kB)
�[K     |████████████████████████████████| 235 kB 29.3 MB/s eta 0:00:01
�[?25hRequirement already satisfied: pydantic>=1.9 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from chromadb) (1.10.7)
Requirement already satisfied: certifi in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from clickhouse-connect>=0.5.7->chromadb) (2022.12.7)
Collecting zstandard
  Downloading zstandard-0.20.0-cp39-cp39-macosx_10_9_x86_64.whl (456 kB)
�[K     |████████████████████████████████| 456 kB 32.9 MB/s eta 0:00:01
�[?25hRequirement already satisfied: urllib3>=1.26 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from clickhouse-connect>=0.5.7->chromadb) (1.26.15)
Collecting lz4
  Downloading lz4-4.3.2-cp39-cp39-macosx_10_9_x86_64.whl (254 kB)
�[K     |████████████████████████████████| 254 kB 30.0 MB/s eta 0:00:01
�[?25hRequirement already satisfied: pytz in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from clickhouse-connect>=0.5.7->chromadb) (2023.3)
Collecting starlette<0.27.0,>=0.26.1
  Using cached starlette-0.26.1-py3-none-any.whl (66 kB)
Requirement already satisfied: python-dateutil>=2.8.1 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from pandas>=1.3->chromadb) (2.8.2)
Requirement already satisfied: six>=1.5 in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages (from posthog>=2.4.0->chromadb) (1.15.0)
Requirement already satisfied: monotonic>=1.5 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from posthog>=2.4.0->chromadb) (1.6)
Requirement already satisfied: backoff>=1.10.0 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from posthog>=2.4.0->chromadb) (2.2.1)
Requirement already satisfied: typing-extensions>=4.2.0 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from pydantic>=1.9->chromadb) (4.5.0)
Requirement already satisfied: idna<4,>=2.5 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from requests>=2.28->chromadb) (3.4)
Requirement already satisfied: charset-normalizer<4,>=2 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from requests>=2.28->chromadb) (3.1.0)
Collecting transformers<5.0.0,>=4.6.0
  Using cached transformers-4.27.4-py3-none-any.whl (6.8 MB)
Requirement already satisfied: tqdm in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from sentence-transformers>=2.2.2->chromadb) (4.65.0)
Collecting torch>=1.6.0
  Downloading torch-2.0.0-cp39-none-macosx_10_9_x86_64.whl (139.8 MB)
�[K     |████████████████████████████████| 139.8 MB 40 kB/s s eta 0:00:01   |▉                               | 3.5 MB 33.7 MB/s eta 0:00:05     |█                               | 4.8 MB 33.7 MB/s eta 0:00:05     |█▉                              | 8.0 MB 33.7 MB/s eta 0:00:04     |██                              | 9.1 MB 33.7 MB/s eta 0:00:04     |██▉                             | 12.6 MB 33.7 MB/s eta 0:00:04     |███▎                            | 14.2 MB 7.0 MB/s eta 0:00:18     |████▊                           | 20.5 MB 7.0 MB/s eta 0:00:18     |█████                           | 21.6 MB 7.0 MB/s eta 0:00:17     |██████▏                         | 27.1 MB 11.6 MB/s eta 0:00:10     |██████▍                         | 28.1 MB 11.6 MB/s eta 0:00:10     |█████████                       | 39.5 MB 11.9 MB/s eta 0:00:09     |█████████▊                      | 42.4 MB 11.9 MB/s eta 0:00:09     |███████████                     | 48.4 MB 11.9 MB/s eta 0:00:08     |███████████▎                    | 49.0 MB 11.4 MB/s eta 0:00:08     |███████████▍                    | 49.7 MB 11.4 MB/s eta 0:00:08     |███████████▉                    | 51.7 MB 11.4 MB/s eta 0:00:08     |████████████▊                   | 55.8 MB 11.4 MB/s eta 0:00:08     |█████████████▏                  | 57.4 MB 11.4 MB/s eta 0:00:08     |███████████████                 | 65.1 MB 11.8 MB/s eta 0:00:07     |████████████████                | 70.1 MB 11.8 MB/s eta 0:00:06     |█████████████████               | 74.6 MB 12.1 MB/s eta 0:00:06     |███████████████████▋            | 85.6 MB 12.5 MB/s eta 0:00:05     |███████████████████▉            | 86.9 MB 12.5 MB/s eta 0:00:05     |████████████████████▋           | 90.0 MB 12.5 MB/s eta 0:00:04     |█████████████████████▏          | 92.4 MB 12.5 MB/s eta 0:00:04     |█████████████████████▎          | 93.0 MB 12.5 MB/s eta 0:00:04     |█████████████████████▋          | 94.3 MB 12.5 MB/s eta 0:00:04     |██████████████████████▊         | 99.5 MB 10.7 MB/s eta 0:00:04     |███████████████████████         | 100.8 MB 10.7 MB/s eta 0:00:04     |████████████████████████        | 104.7 MB 10.7 MB/s eta 0:00:04     |████████████████████████▍       | 106.7 MB 10.7 MB/s eta 0:00:04     |█████████████████████████▏      | 110.0 MB 10.0 MB/s eta 0:00:03     |█████████████████████████▎      | 110.7 MB 10.0 MB/s eta 0:00:03     |█████████████████████████████   | 127.1 MB 10.2 MB/s eta 0:00:02     |███████████████████████████████▊| 138.4 MB 65.9 MB/s eta 0:00:01     |███████████████████████████████▉| 139.0 MB 65.9 MB/s eta 0:00:01
�[?25hCollecting torchvision
  Downloading torchvision-0.15.1-cp39-cp39-macosx_10_9_x86_64.whl (1.5 MB)
�[K     |████████████████████████████████| 1.5 MB 14.1 MB/s eta 0:00:01
�[?25hCollecting scikit-learn
  Downloading scikit_learn-1.2.2-cp39-cp39-macosx_10_9_x86_64.whl (9.1 MB)
�[K     |████████████████████████████████| 9.1 MB 15.5 MB/s eta 0:00:01     |███▏                            | 901 kB 15.5 MB/s eta 0:00:01     |█████████▎                      | 2.6 MB 15.5 MB/s eta 0:00:01
�[?25hCollecting scipy
  Downloading scipy-1.10.1-cp39-cp39-macosx_10_9_x86_64.whl (35.2 MB)
�[K     |████████████████████████████████| 35.2 MB 13.4 MB/s eta 0:00:01    |█████▊                          | 6.3 MB 18.3 MB/s eta 0:00:02     |██████████▏                     | 11.2 MB 18.3 MB/s eta 0:00:02     |████████████▌                   | 13.7 MB 2.4 MB/s eta 0:00:09     |█████████████                   | 14.4 MB 2.4 MB/s eta 0:00:09     |███████████████████             | 21.0 MB 2.4 MB/s eta 0:00:06     |███████████████████▋            | 21.6 MB 2.4 MB/s eta 0:00:06     |████████████████████▎           | 22.2 MB 2.4 MB/s eta 0:00:06     |███████████████████████         | 25.2 MB 13.4 MB/s eta 0:00:01     |███████████████████████████████▎| 34.3 MB 13.4 MB/s eta 0:00:01
�[?25hRequirement already satisfied: nltk in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from sentence-transformers>=2.2.2->chromadb) (3.8.1)
Collecting sentencepiece
  Downloading sentencepiece-0.1.97-cp39-cp39-macosx_10_9_x86_64.whl (1.2 MB)
�[K     |████████████████████████████████| 1.2 MB 10.9 MB/s eta 0:00:01
�[?25hCollecting huggingface-hub>=0.4.0
  Using cached huggingface_hub-0.13.3-py3-none-any.whl (199 kB)
Collecting filelock
  Using cached filelock-3.10.7-py3-none-any.whl (10 kB)
Requirement already satisfied: pyyaml>=5.1 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from huggingface-hub>=0.4.0->sentence-transformers>=2.2.2->chromadb) (6.0)
Requirement already satisfied: packaging>=20.9 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from huggingface-hub>=0.4.0->sentence-transformers>=2.2.2->chromadb) (23.0)
Requirement already satisfied: anyio<5,>=3.4.0 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from starlette<0.27.0,>=0.26.1->fastapi>=0.85.1->chromadb) (3.6.2)
Requirement already satisfied: sniffio>=1.1 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from anyio<5,>=3.4.0->starlette<0.27.0,>=0.26.1->fastapi>=0.85.1->chromadb) (1.3.0)
Collecting jinja2
  Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting networkx
  Using cached networkx-3.0-py3-none-any.whl (2.0 MB)
Collecting sympy
  Using cached sympy-1.11.1-py3-none-any.whl (6.5 MB)
Collecting tokenizers!=0.11.3,<0.14,>=0.11.1
  Downloading tokenizers-0.13.2-cp39-cp39-macosx_10_11_x86_64.whl (3.8 MB)
�[K     |████████████████████████████████| 3.8 MB 26.1 MB/s eta 0:00:01     |█████████████████▎              | 2.0 MB 26.1 MB/s eta 0:00:01
�[?25hRequirement already satisfied: regex!=2019.12.17 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from transformers<5.0.0,>=4.6.0->sentence-transformers>=2.2.2->chromadb) (2023.3.23)
Requirement already satisfied: h11>=0.8 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from uvicorn[standard]>=0.18.3->chromadb) (0.14.0)
Requirement already satisfied: click>=7.0 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from uvicorn[standard]>=0.18.3->chromadb) (8.1.3)
Collecting watchfiles>=0.13
  Using cached watchfiles-0.19.0-cp37-abi3-macosx_10_7_x86_64.whl (405 kB)
Collecting websockets>=10.4
  Downloading websockets-10.4-cp39-cp39-macosx_10_9_x86_64.whl (97 kB)
�[K     |████████████████████████████████| 97 kB 12.7 MB/s eta 0:00:01
�[?25hCollecting uvloop!=0.15.0,!=0.15.1,>=0.14.0
  Downloading uvloop-0.17.0-cp39-cp39-macosx_10_9_x86_64.whl (1.5 MB)
�[K     |████████████████████████████████| 1.5 MB 24.3 MB/s eta 0:00:01
�[?25hCollecting httptools>=0.5.0
  Downloading httptools-0.5.0-cp39-cp39-macosx_10_9_x86_64.whl (161 kB)
�[K     |████████████████████████████████| 161 kB 18.6 MB/s eta 0:00:01
�[?25hCollecting python-dotenv>=0.13
  Using cached python_dotenv-1.0.0-py3-none-any.whl (19 kB)
Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-2.1.2-cp39-cp39-macosx_10_9_x86_64.whl (13 kB)
Requirement already satisfied: joblib in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from nltk->sentence-transformers>=2.2.2->chromadb) (1.2.0)
Collecting threadpoolctl>=2.0.0
  Using cached threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
Collecting mpmath>=0.19
  Using cached mpmath-1.3.0-py3-none-any.whl (536 kB)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /Users/ayush.sharma/Library/Python/3.9/lib/python/site-packages (from torchvision->sentence-transformers>=2.2.2->chromadb) (9.4.0)
Building wheels for collected packages: hnswlib, sentence-transformers
  Building wheel for hnswlib (PEP 517) ... �[?25lerror
�[31m  ERROR: Command errored out with exit status 1:
   command: /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/pt/5z09lb6n7psd9yl73dgmfzyr0000gq/T/tmp21hiv7a7
       cwd: /private/var/folders/pt/5z09lb6n7psd9yl73dgmfzyr0000gq/T/pip-install-ru_z39pa/hnswlib_1880f842f28b4e0ea92b979d054ed33a
  Complete output (16 lines):
  running bdist_wheel
  running build
  running build_ext
  creating var
  creating var/folders
  creating var/folders/pt
  creating var/folders/pt/5z09lb6n7psd9yl73dgmfzyr0000gq
  creating var/folders/pt/5z09lb6n7psd9yl73dgmfzyr0000gq/T
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /var/folders/pt/5z09lb6n7psd9yl73dgmfzyr0000gq/T/tmpi4l126lq.cpp -o var/folders/pt/5z09lb6n7psd9yl73dgmfzyr0000gq/T/tmpi4l126lq.o -std=c++14
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /var/folders/pt/5z09lb6n7psd9yl73dgmfzyr0000gq/T/tmpqz4b8g3g.cpp -o var/folders/pt/5z09lb6n7psd9yl73dgmfzyr0000gq/T/tmpqz4b8g3g.o -fvisibility=hidden
  creating build
  creating build/temp.macosx-10.9-universal2-3.9
  creating build/temp.macosx-10.9-universal2-3.9/python_bindings
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/private/var/folders/pt/5z09lb6n7psd9yl73dgmfzyr0000gq/T/pip-build-env-vg3l1_mn/overlay/lib/python3.9/site-packages/pybind11/include -I/private/var/folders/pt/5z09lb6n7psd9yl73dgmfzyr0000gq/T/pip-build-env-vg3l1_mn/overlay/lib/python3.9/site-packages/numpy/core/include -I./hnswlib/ -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c ./python_bindings/bindings.cpp -o build/temp.macosx-10.9-universal2-3.9/./python_bindings/bindings.o -O3 -march=native -stdlib=libc++ -mmacosx-version-min=10.7 -DVERSION_INFO=\"0.7.0\" -std=c++14 -fvisibility=hidden
  clang: error: the clang compiler does not support '-march=native'
  error: command '/usr/bin/clang' failed with exit code 1
  ----------------------------------------�[0m
�[?25h�[31m  ERROR: Failed building wheel for hnswlib�[0m
  Building wheel for sentence-transformers (setup.py) ... �[?25ldone
�[?25h  Created wheel for sentence-transformers: filename=sentence_transformers-2.2.2-py3-none-any.whl size=125938 sha256=e245648e57769253b74beca554c41ccf8ef6cb6b98f66354fc6fd8a6915fe2a3
  Stored in directory: /Users/ayush.sharma/Library/Caches/pip/wheels/71/67/06/162a3760c40d74dd40bc855d527008d26341c2b0ecf3e8e11f
Successfully built sentence-transformers
Failed to build hnswlib
�[31mERROR: Could not build wheels for hnswlib which use PEP 517 and cannot be installed directly�[0m
�[33mWARNING: You are using pip version 21.2.4; however, version 23.0.1 is available.
You should consider upgrading via the '/Library/Developer/CommandLineTools/usr/bin/python3 -m pip install --upgrade pip' command.�[0m
Note: you may need to restart the kernel to use updated packages.
turtleeeeee

turtleeeeee commented on Mar 31, 2023

@turtleeeeee

Same problem for python 3.9.6 on Mac OS 13.1

ayush-vibrant

ayush-vibrant commented on Mar 31, 2023

@ayush-vibrant

quick update: for now I am using python 3.10.10 and it is working fine for me. For my use-case 3.11 isn't a hard blocker.

GingerAle3101

GingerAle3101 commented on Apr 3, 2023

@GingerAle3101

3.10.10 is actually the only python version that's allowing me to pip install chromadb, fyi.

anentropic

anentropic commented on Apr 3, 2023

@anentropic

I have this problem with Python 3.10.3 on macOS 13.2 (M1)

...
        /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:610:45: error: unknown type name 'nullptr_t'
        operator!=(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT
                                                    ^
        fatal error: too many errors emitted, stopping now [-ferror-limit=]
        20 errors generated.
        error: command '/usr/bin/clang' failed with exit code 1
        [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
alejandrogomez314

alejandrogomez314 commented on Apr 26, 2023

@alejandrogomez314

@ayush-vibrant I was able to resolve this issue by setting export HNSWLIB_NO_NATIVE=1 and running pip install again. Would be good to have this issue resolved though.

anentropic

anentropic commented on Apr 26, 2023

@anentropic

for me I get a different error then:

$ export HNSWLIB_NO_NATIVE=1
$ pip install hnswlib
Collecting hnswlib
  Using cached hnswlib-0.7.0.tar.gz (33 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      Traceback (most recent call last):
        File "/virtualenvs/experiments-langchain-FPovFLPB-py3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
          main()
        File "/virtualenvs/experiments-langchain-FPovFLPB-py3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/virtualenvs/experiments-langchain-FPovFLPB-py3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/private/var/folders/w1/_vgkxyln4c7bk8kr29s1y1k00000gn/T/pip-build-env-pt4qsunf/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/private/var/folders/w1/_vgkxyln4c7bk8kr29s1y1k00000gn/T/pip-build-env-pt4qsunf/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/w1/_vgkxyln4c7bk8kr29s1y1k00000gn/T/pip-build-env-pt4qsunf/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 74, in <module>
        File "<string>", line 91, in BuildExt
      ValueError: list.remove(x): x not in list
      [end of output]

I have tried via both pip install and poetry add

Both have same error, but Poetry also appends a message:

Note: This error originates from the build backend, and is likely not a problem with poetry but with hnswlib (0.7.0) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "hnswlib (==0.7.0)"'.

If I run pip wheel --use-pep517 "hnswlib (==0.7.0)" I get the same error

If PEP-517 is the problem, I tried this:

$ pip install --no-use-pep517 hnswlib
Collecting hnswlib
  Using cached hnswlib-0.7.0.tar.gz (33 kB)
ERROR: Disabling PEP 517 processing is invalid: project specifies a build backend of setuptools.build_meta in pyproject.toml
sarang-lvs

sarang-lvs commented on May 9, 2023

@sarang-lvs

I had the same issue and I am not using Conda, with Windows. I fixed it in following way:

  1. Download latest VS Build Tools 2022 here: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022
  2. From 'Desktop development with C++' workload, select 'MSVC v143 - VS 2022 C++ x64/x86 build tools'
  3. Modify/ install it.
  4. You may have to restart
  5. Install Chromadb on vscode. If there's a permission issue, use 'pip install chromadb --user'
Alain1405

Alain1405 commented on May 11, 2023

@Alain1405

This appears to be related to nmslib/hnswlib#442

Brandl

Brandl commented on May 11, 2023

@Brandl

As a datapoint, moving from System 3.10.6 to pyenv and 3.11.2 solved the problem.
Ubuntu 22.04

29 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @peterk@anentropic@ManadayM@jeffchuber@hughesadam87

        Issue actions

          ChromaDB installation problem on Windows (solutions in thread) · Issue #250 · chroma-core/chroma