Install the correct onxruntime for chromadb with pip install – Pip

by
Ali Hasan
azure-pipelines chromadb llama-cpp-python openai-api vector-database

Quick Fix: If Python 3.6 is being used, install onxruntime version 1.11.1. It’s compatible with Python 3.6, unlike later versions. Alternatively, upgrade Python to a version supported by newer onxruntime releases.

The Problem:

You are trying to install chromadb on your Jupyter notebook using pip, but you are encountering an error stating that the required version of onnxruntime (a dependency of chromadb) could not be found. You have installed onnxruntime version 1.11.1, but chromadb requires a version greater than 1.14.1. You are wondering if there is a way to resolve this dependency issue and successfully install chromadb on your system.

The Solutions:

Solution 1: Python Version Compatibility

The issue arises due to the compatibility of `onxruntime` with different versions of Python. `onxruntime` version 1.11.1 supports Python 3.6, while later versions require at least Python 3.7. If you are using Python 3.6, you will need to upgrade to a compatible version of Python in order to install a later version of `onxruntime`. All versions up to the current 1.15.1 require at least Python 3.7; 1.15.0 and 1.15.1 don’t provide wheels for Python 3.7, only for 3.8+.

Q&A

What is the highest compatible version of onxruntime with my OS?

Assuming you have Python 3.6, the highest compatible version of onxruntime is 1.11.1.

What is the reason for the error message: "ERROR: Could not find a version that satisfies the requirement onnxruntime>=1.14.1 (from chromadb)"?

The error occurs because onxruntime version 1.11.1, which is compatible with your OS, does not meet the requirement of chromadb, which requires onxruntime version 1.14.1 or higher.

How can I install a compatible version of onxruntime for chromadb?

To install a compatible version of onxruntime for chromadb, you need to upgrade your Python version to 3.7 or higher, as onxruntime versions 1.14.1 and later require at least Python 3.7.