Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chromadb fails to install on windows 10 and python 3.9 #189

Closed
taqihaider7 opened this issue Feb 28, 2023 · 24 comments
Closed

chromadb fails to install on windows 10 and python 3.9 #189

taqihaider7 opened this issue Feb 28, 2023 · 24 comments
Labels
installation trouble trouble building or installing chroma

Comments

@taqihaider7
Copy link

taqihaider7 commented Feb 28, 2023

`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 taqihaider7 changed the title chroma fails install on python 3.9 chroma fails to install on windows 10 and python 3.9 Feb 28, 2023
@taqihaider7 taqihaider7 changed the title chroma fails to install on windows 10 and python 3.9 chromadb fails to install on windows 10 and python 3.9 Feb 28, 2023
@anish9
Copy link

anish9 commented Mar 1, 2023

@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

@taqihaider7
Copy link
Author

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

@0toshigami
Copy link

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

@jeffchuber jeffchuber added the installation trouble trouble building or installing chroma label Mar 29, 2023
@Kriswilkinson
Copy link

The above fixes still dont work for me.

This code will be the last of me!!😡

@HoiDam
Copy link

HoiDam commented Jun 1, 2023

The above fixes still dont work for me.

This code will be the last of me!!😡

You mad?

@jeffchuber
Copy link
Contributor

@HoiDam please be kind. It does sound frustrating.

@HoiDam
Copy link

HoiDam commented Jun 5, 2023

@HoiDam please be kind. It does sound frustrating.

Yaaa. But it works in my machine.

@AsarlaRajkumar
Copy link

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!!! :)

@znaixian
Copy link

Yes, this solved my exact same problem. thanks.

@gannuvineel
Copy link

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!

@akstud
Copy link

akstud commented Jul 2, 2023

what to do after installing these files

@chroma-core chroma-core deleted a comment from Madafanes0 Jul 14, 2023
@Ndohjapan
Copy link

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 :)

@ShubhamZoro
Copy link

This works for me as well. Thank you.

@EricEsajian
Copy link

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

@oayodeji
Copy link

The solution worked for me too :)

@mokasha2020
Copy link

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
Copy link

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

@brunopf333
Copy link

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

@SethuICOMM
Copy link

SethuICOMM commented Sep 1, 2023

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

@Abu-0-RayhaN
Copy link

The above fixes still dont work for me.

This code will be the last of me!!😡

I can feel you man.

@Abu-0-RayhaN
Copy link

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.

@sanjayporwal02
Copy link

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

@always-oles
Copy link

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

@tparisotto
Copy link

tparisotto commented May 7, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation trouble trouble building or installing chroma
Projects
None yet
Development

No branches or pull requests