Onnxruntime doesn't have a source distribution or wheel for the current platform

New to CrewAI and trying to run a simple project on a OSX M1 MacBook Pro but getting the error below. Has anyone seen this and/or has a resolution?
Tried with Python 3.11 and 3.12 under Anaconda.
many thanks
*P

Running the Crew
error: Distribution onnxruntime==1.20.0 @ registry+https://pypi.org/simple can’t be installed because it doesn’t have a source distribution or wheel for the current platform
An error occurred while running the crew: Command ‘[‘uv’, ‘run’, ‘run_crew’]’ returned non-zero exit status 2.

1 Like

Can you update pip and try again

pip install --upgrade pip

Thanks for the suggestion. Unfortunately problem persists. Could it be machine or OSX (Sonoma 14.5) or CPU (M1) specific?

Basically this is what I’m doing

conda create -n crewai python=3.12
pip install --upgrade pip
pip install crewai crewai-tools

Then I navigate to my application directory and call:

crewai run

Which results in:

Running the Crew
error: Distribution `onnxruntime==1.20.0 @ registry+https://pypi.org/simple` can't be installed because it doesn't have a source distribution or wheel for the current platform
An error occurred while running the crew: Command '['uv', 'run', 'run_crew']' returned non-zero exit status 2.

Let me work out what package is installing that as a dependency

Seems to be chromadb. Note that I ran into the same issue on my Mac Intel desktop. Anyone else reported similar problem? Wondering if it’s just me…

Name: onnxruntime
Version: 1.20.0
Summary: ONNX Runtime is a runtime accelerator for Machine Learning models
Home-page: https://onnxruntime.ai
Author: Microsoft Corporation
Author-email: onnxruntime@microsoft.com
License: MIT License
Location: /Users/pascal/opt/anaconda3/envs/crewai/lib/python3.12/site-packages
Requires: coloredlogs, flatbuffers, numpy, packaging, protobuf, sympy
Required-by: chromadb

hi im having the same issue. try to follow the documentation. having problems using python 3.13. using 3.12 managed to install crewai. I installed ‘crewai create crew latest-ai-development’ but when i run ‘crewai install’ or ‘uv sync’ in my case a get the message: Distribution onnxruntime==1.20.1… they recently launched the 1.20.1 version Released: about 17 hours ago.

Thanks for reporting this. It could be something related to the new release on onnxruntime. Will keep checking.

Same issue. Apple M1 chip running Sonoma 14.7. Python 3.11.10. Exact same error.

Tried downgrading in pyproject.toml to onnxruntime<1.20.0 but still fails:
error: Distribution onnxruntime==1.19.2 @ registry+https://pypi.org/simple can’t be installed because it doesn’t have a source distribution or wheel for the current platform

Grateful for any pointers or any input from people who have this working on an Apple chipset.

1 Like

No significant update on my end. Just noticed that, in 2022, it was reported that onnxruntime does not have a source release on PyPi. Suspect this has not changed. Based on pip dependencies, it seems related to ChromaDB.

Getting the same error. Macbook Pro, Intel Core i7, Sonoma 14.7.1, Python 3.11.5.
Tried various options recommended by folks on the internet, but no luck.

I have also been getting the same error as the rest of the folks here.

A few details

  1. I am trying to reproduce the results in these yt videos - https://www.youtube.com/watch?v=twzgEBabOBk&t=210s - where I believe the authors are using the latest version of crewai.
  2. I am using crewai==0.80.0, python==3.10.8, Amazon Linux ec2 instance with centos rhel fedora OS.

To get around the onnxruntime error, I am using chromadb==0.4.24 and onnxruntime==1.14.1.

I tested the above configs to implement the demo in the above yt video. I created my own version of the pyproject.toml file which is a slightly tweaked compared with the original version as in the above yt video. Here is the tweaked toml file:

[project]
name = “edu”
version = “0.1.0”
description = “edu using crewAI”
authors = [{ name = “Your Name”, email = “you@example.com” }]
requires-python = “>=3.10,<=3.13”
dependencies = [
“crewai[tools]>=0.80.0,<1.0.0”,
“pydantic>=2.4.2”,
“langchain>=0.2.16”,
“openai>=1.13.3”,
“opentelemetry-api>=1.22.0”,
“opentelemetry-sdk>=1.22.0”,
“opentelemetry-exporter-otlp-proto-http>=1.22.0”,
“instructor>=1.3.3”,
“regex>=2024.9.11”,
“crewai-tools>=0.14.0”,
“click>=8.1.7”,
“python-dotenv>=1.0.0”,
“appdirs>=1.4.4”,
“jsonref>=1.1.0”,
“json-repair>=0.25.2”,
“auth0-python>=4.7.1”,
“litellm>=1.44.22”,
“pyvis>=0.3.2”,
“uv>=0.4.25”,
“tomli-w>=1.1.0”,
“tomli>=2.0.2”,
“chromadb==0.4.24”,
“onnxruntime==1.14.1”
]

[project.scripts]
edu = “edu.main:run”
run_crew = “edu.main:run”
train = “edu.main:train”
replay = “edu.main:replay”
test = “edu.main:test”

[build-system]
requires = [“hatchling”]
build-backend = “hatchling.build”

[tool.hatch.build.targets.wheel]
packages = [“src/edu”]

Let me know if this works for you.

I have the same error. I updated the version of crewai and the error appears.

Thanks @Reevu_Maity , your solution worked for me! But I had to change “onnxruntime==1.14.1” to “onnxruntime==1.16.3”.

This the project toml that worked for me:
dependencies = [
“crewai[tools]>=0.80.0,<1.0.0”,
“pydantic>=2.4.2”,
“langchain>=0.2.16”,
“openai>=1.13.3”,
“opentelemetry-api>=1.22.0”,
“opentelemetry-sdk>=1.22.0”,
“opentelemetry-exporter-otlp-proto-http>=1.22.0”,
“instructor>=1.3.3”,
“regex>=2024.9.11”,
“crewai-tools>=0.14.0”,
“click>=8.1.7”,
“python-dotenv>=1.0.0”,
“appdirs>=1.4.4”,
“jsonref>=1.1.0”,
“json-repair>=0.25.2”,
“auth0-python>=4.7.1”,
“litellm>=1.44.22”,
“pyvis>=0.3.2”,
“uv>=0.4.25”,
“tomli-w>=1.1.0”,
“tomli>=2.0.2”,
“chromadb==0.4.24”,
“onnxruntime==1.16.3”
]

this and @ Reevu_Maity I think you’re both working on a Linux install. Anyone found a compination that works on Apple silicon per original poster?

I got the following errors:
error: Distribution onnxruntime==1.20.1 @ registry+https://pypi.org/simple can’t be installed because it doesn’t have a source distribution or wheel for the current platform
An error occurred while running the crew: Command ‘[‘uv’, ‘sync’]’ returned non-zero exit status 2.

Tried multiple python versions with venv & anaconda approach, but no luck yet. Anyone else found work around to set it up in local machines?

I got the same errors. sequoia 15.1.1, apple m4, python 3.12.0 under anaconda. :frowning:

(venv) crewai install
Resolved 228 packages in 9ms
error: Distribution onnxruntime==1.20.1 @ registry+https://pypi.org/simple can’t be installed because it doesn’t have a source distribution or wheel for the current platform
An error occurred while running the crew: Command ‘[‘uv’, ‘sync’]’ returned non-zero exit status 2.

finally i got it working on mbp m4 + sequoia 15.1.1 + python 3.11.10.

  1. use python 3.11.10.

conda create -p /path/to/venv python=3.11.10

python 3.12 does not work, as any onnxruntime>=1.15.0 will report the wheel errors while chromadb requires onnxruntime>=1.14.1.

  1. use the previous crewai 0.80.0, not the latest 0.83.0.

pip install crewai==0.80.0
pip install socksio # also required to create crew

  1. modify dependencies in pyproject.toml and onnxruntime==1.15.0:

[project]
name = “news”
version = “0.1.0”
description = “news using crewAI”
authors = [{ name = “Your Name”, email = “you@example.com” }]
requires-python = “>=3.10,<=3.13”
dependencies = [
“crewai[tools]>=0.80.0,<1.0.0”,
“onnxruntime==1.15.0”,
“socksio>=1.0.0”,
“pyarrow==17.0.0”,
]

[project.scripts]
news = “news.main:run”
run_crew = “news.main:run”
train = “news.main:train”
replay = “news.main:replay”
test = “news.main:test”

[build-system]
requires = [“hatchling”]
build-backend = “hatchling.build”

now crewai install works. i see a “failed to clone files …” warning during crewai install. i just ignored. seems no hurt.

hope the above helps. :smiley:

2 Likes

Thank you so much. That worked like charm!!

1 Like

Thanks
Had the same issue with M1
Version 12.5
Monterey

Your solution worked for me as well
Thanks

1 Like