ModuleNotFoundError: No module named 'crewai.knowledge'

I’m using the following version:

Name: crewai
Version: 0.86.0 with the Tools installed.

However, when I execute:

from crewai import Agent, Crew, Process, Task
from crewai.project import CrewBase, agent, crew, task
from crewai.knowledge.source.json_knowledge_source import ExcelKnowledgeSource

I get:

ModuleNotFoundError Traceback (most recent call last) Cell In[12], line 3 1 from crewai import Agent, Crew, Process, Task 2 from crewai.project import CrewBase, agent, crew, task ----> 3 from crewai.knowledge.source.json_knowledge_source import ExcelKnowledgeSource ModuleNotFoundError: No module named 'crewai.knowledge'

Seems simple enough, but I don’t see what module needs to be installed or what version could be different. Google searched turn up nothing.

Any suggestions would be greatly appreciated.

Whenever I get problems like this. I go back to basics and test a very simple crew.
Once I confirm that is working i move forward to add in additional items.
Do you have a working crew on your platform already? As this could be an environment problem.

Also. Try updating to the latest version .100.0 as 0.86 is two releases out of date

Hello there, I did go through your issue, and two points caught my attention.

  1. It would be better to use a newer version of CrewAI, as the updates are coming in fast. As of now, version 0.100.0 is out, I would suggest updating to the newer version for better support.

  2. Regarding the error, try importing the package using the following:-

"from crewai.knowledge.source.excel_knowledge_source import ExcelKnowledgeSource"

  • This is the code for importing Excel Knowledge Source as per the latest documentation as you have updated the version.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.