chroma icon indicating copy to clipboard operation
chroma copied to clipboard

chromadb fails to install on windows 10 and python 3.9

Open taqihaider7 opened this issue 2 years ago • 3 comments

`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`

I have also install the latest Microsoft Visual C++ redistributions but it is still giving the error

taqihaider7 avatar Feb 28 '23 18:02 taqihaider7

@taqihaider7 install python3.9 dev and install again,

In my case:

  1. installed python3.10-dev properly
  2. update gcc to latest.

this resolved for me

anish9 avatar Mar 01 '23 12:03 anish9

don't it work on windows because on my friend's system with same specification it is working.

taqihaider7 avatar Mar 01 '23 17:03 taqihaider7

You need to download https://visualstudio.microsoft.com/visual-cpp-build-tools/ first.

Next, navigate to "Individual components", find these two image

In your case, you should choose Windows 10 SDK image

0toshigami avatar Mar 04 '23 04:03 0toshigami

The above fixes still dont work for me.

This code will be the last of me!!😡

Kriswilkinson avatar May 17 '23 13:05 Kriswilkinson

The above fixes still dont work for me.

This code will be the last of me!!😡

You mad?

HoiDam avatar Jun 01 '23 09:06 HoiDam

@HoiDam please be kind. It does sound frustrating.

jeffchuber avatar Jun 02 '23 05:06 jeffchuber

@HoiDam please be kind. It does sound frustrating.

Yaaa. But it works in my machine.

HoiDam avatar Jun 05 '23 02:06 HoiDam

You need to download https://visualstudio.microsoft.com/visual-cpp-build-tools/ first.

Next, navigate to "Individual components", find these two image

In your case, you should choose Windows 10 SDK image

this really worked for me. Thanks a lot!!! :)

AsarlaRajkumar avatar Jun 22 '23 09:06 AsarlaRajkumar

Yes, this solved my exact same problem. thanks.

znaixian avatar Jun 22 '23 20:06 znaixian

You need to download https://visualstudio.microsoft.com/visual-cpp-build-tools/ first.

Next, navigate to "Individual components", find these two image

In your case, you should choose Windows 10 SDK image

It worked on my windows machine too!

gannuvineel avatar Jun 28 '23 06:06 gannuvineel

what to do after installing these files

akstud avatar Jul 02 '23 13:07 akstud

You need to download https://visualstudio.microsoft.com/visual-cpp-build-tools/ first.

Next, navigate to "Individual components", find these two image

In your case, you should choose Windows 10 SDK image

Thanks a lot for this.

It worked perfectly :)

Ndohjapan avatar Jul 20 '23 20:07 Ndohjapan

This works for me as well. Thank you.

ShubhamZoro avatar Jul 27 '23 07:07 ShubhamZoro

Ok got it.... so a long winded solution for my use case but here it goes:

  1. download https://visualstudio.microsoft.com/visual-cpp-build-tools/

  2. however you have to navigate to "Individual components", find select those that were called out above:

  3. finish the install

  4. reboot computer

  5. Then did a !pip install chromadb==0.3.26 selecting this specific version which worked for me

Solutions I tried but didn't work for me, however worked for others:

  1. !pip install wheel

  2. !pip install --upgrade setuptools

EricEsajian avatar Jul 28 '23 22:07 EricEsajian

The solution worked for me too :)

oayodeji avatar Jul 31 '23 16:07 oayodeji

For those who are looking for where to find individual components, you will have to click on "Download Build Tools" as shown in the snapshot attached. Install the .exe file and you will see a window that pops up with a tab called "Individual components"

image

mokasha2020 avatar Aug 14 '23 19:08 mokasha2020

I still couldn't install chromadb after downloading and installing build tools. However, here is what worked for me in steps below:

I had lots of problems installing chromadb but I finally installed it today using a pip command.

Here is what worked for me: 1- In VS, go to Tools>Get Tools and Features.

image

2- Under workloads, make sure Desktop development with C++ is installed.

image

3- Create a conda Virtual Environment and choose Python version 3.10. You can do it the Anaconda Command prompt using the following command: conda create -n env-01 python 3.10

4- In Anaconda Prompt, make sure you are in the project directory where you installed the environment and type: conda activate env-01

5- Try pip install chromadb

If it works, then you can use this environment for your project in Visual Studio Code.

Some references about setting up environments in Visual Studio Code.

https://code.visualstudio.com/docs/python/environments

mokasha2020 avatar Aug 15 '23 16:08 mokasha2020

You need to download https://visualstudio.microsoft.com/visual-cpp-build-tools/ first.

Next, navigate to "Individual components", find these two image

In your case, you should choose Windows 10 SDK image

Thanks my friend, it worked very well

brunopf333 avatar Aug 27 '23 01:08 brunopf333

Hi, I tried and installed my machined VC++ and checked control panel - >program & features.

After i tried to install chromadb then system throw same error image

image

I think my path not taking VC++ redistributable pakage at that time of compiling.

I installed python 3.11.

Kindly help me out

SethuICOMM avatar Sep 01 '23 11:09 SethuICOMM

The above fixes still dont work for me.

This code will be the last of me!!😡

I can feel you man.

Abu-0-RayhaN avatar Jan 20 '24 18:01 Abu-0-RayhaN

I have installed sdk 11 and msvc too but it still shows this

      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.38.33130\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for typed-ast
Failed to build Pillow typed-ast
ERROR: Could not build wheels for Pillow, typed-ast, which is required to install pyproject.toml-based projects

this is the question stackoverflow: Link i'm using python 3.11.

Abu-0-RayhaN avatar Jan 20 '24 20:01 Abu-0-RayhaN

I tried above solution but it isn't working for me. I am using Windows 10 and Python 3.9

sanjayporwal02 avatar Feb 14 '24 15:02 sanjayporwal02

I've met the same issue on Windows 11 Python 3.11.8 Solution:

  1. Install Python 3.10
  2. py -3.10 -m pip install chromadb

always-oles avatar Feb 14 '24 23:02 always-oles

Had the same issue. Reinstalling MSVC didn't work. I was trying to install chromadb on a Python 3.12 environment. The main issue comes from installing the dependency hnswlib but was not able to find a solution.

I rebuilt the environment with Python 3.10 and it works just fine.

tparisotto avatar May 07 '24 09:05 tparisotto

You need to download https://visualstudio.microsoft.com/visual-cpp-build-tools/ first. Next, navigate to "Individual components", find these two image In your case, you should choose Windows 10 SDK image

Thanks a lot for this.

It worked perfectly :)

What is i am using Windows 10? should i install windows 11 SDK in any case?

Faiz4work avatar Jun 03 '24 12:06 Faiz4work

You need to download https://visualstudio.microsoft.com/visual-cpp-build-tools/ first. Next, navigate to "Individual components", find these two image In your case, you should choose Windows 10 SDK image

Thanks a lot for this. It worked perfectly :)

What is i am using Windows 10? should i install windows 11 SDK in any case?

It looks like the answer your question is in the message you replied to.

In your case, you should choose Windows 10 SDK

jcarmfran avatar Jun 04 '24 16:06 jcarmfran

Thanks a lot for the solution solved the build issue with ChromaDB installation!

docmhvr avatar Jul 25 '24 21:07 docmhvr

i tried every possible ways but i couldnt resolve this issue. I was trying to install dependencies for localGPT. Please share any solutions for this.

NakulDeotale avatar Aug 06 '24 09:08 NakulDeotale