ModuleNotFoundError: No Module Named ‘crewai’ (2026)

CrewAI is a Python framework for orchestrating role-based AI agents that collaborate on tasks. It is one of the hottest multi-agent frameworks in 2026 alongside LangGraph. If you see ModuleNotFoundError: No module named ‘crewai’, install with one pip command.

ModuleNotFoundError No Module Named 'crewai' (2026)

Step 1: Install crewai

# Base install:
pip install crewai

# With tool integrations (RAG, file I/O, web search):
pip install 'crewai[tools]'

# Specific Python version (CrewAI needs 3.10+, 3.13 not yet stable):
python3.11 -m pip install crewai

Step 2: Minimal crew example

from crewai import Agent, Task, Crew, Process

researcher = Agent(
    role='Research Analyst',
    goal='Find recent AI breakthroughs',
    backstory='Expert at scanning technical papers and summarizing key findings.',
    verbose=True
)

writer = Agent(
    role='Tech Writer',
    goal='Turn research into clear blog posts',
    backstory='Award-winning explainer of complex tech.',
    verbose=True
)

research_task = Task(
    description='Find 3 recent advances in multimodal LLMs',
    agent=researcher,
    expected_output='3 bullet points with sources'
)

write_task = Task(
    description='Write a 500-word blog from the research',
    agent=writer,
    expected_output='Final blog post in markdown'
)

crew = Crew(
    agents=[researcher, writer],
    tasks=[research_task, write_task],
    process=Process.sequential,
    verbose=True
)

result = crew.kickoff()
print(result)

Step 3: Use a local Ollama model (no API cost)

from crewai import Agent, LLM

local_llm = LLM(
    model="ollama/llama3.1",
    base_url="http://localhost:11434"
)

agent = Agent(role='Analyst', goal='...', backstory='...', llm=local_llm)

Why this error happens

CauseFix
Not installedpip install crewai
Python under 3.10CrewAI requires 3.10-3.12; install correct Python
Pinned ancient versionpip install -U crewai
No tools, need integrationspip install ‘crewai[tools]’

Frequently Asked Questions

CrewAI vs LangGraph: which should I use?

CrewAI uses a high-level role-based mental model (give each agent a role, goal, backstory). LangGraph is lower-level with explicit state graphs and edges. CrewAI is faster to prototype; LangGraph gives you more control for production deployments with checkpoints and time-travel debugging.

Does CrewAI need OpenAI?

No. CrewAI uses LiteLLM under the hood and supports OpenAI, Anthropic, Gemini, Ollama, Groq, Mistral, Azure, Bedrock, Vertex, and 100+ providers. Set OPENAI_API_KEY or pass an LLM object directly to each Agent.

Is CrewAI free and open-source?

The framework is free (MIT). CrewAI Enterprise (managed hosting + observability + SLA) is a paid product. The library itself works for any project, including commercial.

Can agents use custom tools?

Yes. Define a tool with @tool decorator or BaseTool subclass, then pass it in tools=[] to an Agent. Built-in tools cover file I/O, web search (Serper), CSV/PDF read, RAG over directories, code execution.

What processes does CrewAI support?

Process.sequential runs tasks in order. Process.hierarchical adds a manager agent that delegates to crew members and reviews their output. Both can run with verbose=True for full traces.

Leave a Comment