This is relevant to the installation problem discussed before. I follow the instruction and was able to progress to crewai run
. The run succeeded but with minor errors; it repeated 3 times, then shows the normal agent running flow. I believe it has to do with onnxruntime PYPI support problem in some Mac operating systems. can someone share your setup?
My installation setup:
python3.11 -c "import platform; print(platform.machine())"
arm64
Mac Sequoia 15.1.1
python -V
Python 3.11.8
project.toml:
dependencies = [
"crewai[tools]>=0.80.0,<1.0.0",
"onnxruntime==1.15.0",
"socksio>=1.0.0",
"pyarrow==17.0.0",
]
pip list | grep crewai
crewai 0.80.0
crewai-tools 0.17.0
crewai run
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.2.4 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "/Users/moonshine/workspace/babel/.venv/bin/crewai", line 4, in <module>
from crewai.cli.cli import crewai
File "/Users/moonshine/workspace/babel/.venv/lib/python3.11/site-packages/crewai/__init__.py", line 3, in <module>
from crewai.agent import Agent
File "/Users/moonshine/workspace/babel/.venv/lib/python3.11/site-packages/crewai/agent.py", line 8, in <module>
from crewai.agents import CacheHandler
File "/Users/moonshine/workspace/babel/.venv/lib/python3.11/site-packages/crewai/agents/__init__.py", line 2, in <module>
from .parser import CrewAgentParser
File "/Users/moonshine/workspace/babel/.venv/lib/python3.11/site-packages/crewai/agents/parser.py", line 6, in <module>
from crewai.utilities import I18N
File "/Users/moonshine/workspace/babel/.venv/lib/python3.11/site-packages/crewai/utilities/__init__.py", line 13, in <module>
from .embedding_configurator import EmbeddingConfigurator
File "/Users/moonshine/workspace/babel/.venv/lib/python3.11/site-packages/crewai/utilities/embedding_configurator.py", line 4, in <module>
from chromadb import Documents, EmbeddingFunction, Embeddings
File "/Users/moonshine/workspace/babel/.venv/lib/python3.11/site-packages/chromadb/__init__.py", line 3, in <module>
from chromadb.api.client import Client as ClientCreator
File "/Users/moonshine/workspace/babel/.venv/lib/python3.11/site-packages/chromadb/api/__init__.py", line 34, in <module>
from chromadb.api.models.Collection import Collection
File "/Users/moonshine/workspace/babel/.venv/lib/python3.11/site-packages/chromadb/api/models/Collection.py", line 3, in <module>
from chromadb.api.models.CollectionCommon import CollectionCommon
File "/Users/moonshine/workspace/babel/.venv/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 100, in <module>
class CollectionCommon(Generic[ClientT]):
File "/Users/moonshine/workspace/babel/.venv/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 112, in CollectionCommon
] = ef.DefaultEmbeddingFunction(), # type: ignore
File "/Users/moonshine/workspace/babel/.venv/lib/python3.11/site-packages/chromadb/utils/embedding_functions/__init__.py", line 57, in DefaultEmbeddingFunction
ONNXMiniLM_L6_V2(), # type: ignore[name-defined] # noqa: F821
File "/Users/moonshine/workspace/babel/.venv/lib/python3.11/site-packages/chromadb/utils/embedding_functions/onnx_mini_lm_l6_v2.py", line 63, in __init__
self.ort = importlib.import_module("onnxruntime")
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/Users/moonshine/workspace/babel/.venv/lib/python3.11/site-packages/onnxruntime/__init__.py", line 23, in <module>
from onnxruntime.capi._pybind_state import ExecutionMode # noqa: F401
File "/Users/moonshine/workspace/babel/.venv/lib/python3.11/site-packages/onnxruntime/capi/_pybind_state.py", line 33, in <module>
from .onnxruntime_pybind11_state import * # noqa
AttributeError: _ARRAY_API not found
ImportError: numpy.core.multiarray failed to import
The above exception was the direct cause of the following exception:
SystemError: <built-in function __import__> returned a result with an exception set
Running the Crew
SystemError: <built-in function __import__> returned a result with an exception set
╭────────────────────────────────────────── Crew Execution Started ───────────────────────────────────────────╮
│ │
│ Crew Execution Started │
│ Name: crew │
│ ID: a0318058-f04c-4b1f-abbc-4f561b42a0aa │
│ │
│ │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
🚀 Crew: crew
└── 📋 Task: 595f5c15-a706-4df9-8a09-d13b6d7d19dc
Status: Executing Task...
🚀 Crew: crew
└── 📋 Task: 595f5c15-a706-4df9-8a09-d13b6d7d19dc
Status: Executing Task...
└── 🤖 Agent: Tweet text and context recomposer
Status: In Progress
# Agent: Tweet text and context recomposer
## Task: Extract text and context from the tweet structure.
🚀 Crew: crew
└── 📋 Task: 595f5c15-a706-4df9-8a09-d13b6d7d19dc
Status: Executing Task...
└── 🤖 Agent: Tweet text and context recomposer
Status: In Progress
└── 🧠 Thinking...
🚀 Crew: crew
└── 📋 Task: 595f5c15-a706-4df9-8a09-d13b6d7d19dc
Status: Executing Task...
└── 🤖 Agent: Tweet text and context recomposer
Status: In Progress
...