# ImportError: cannot import name 'LocalKnowledge' from 'crewai.knowledge'

**URL:** <https://community.crewai.com/t/importerror-cannot-import-name-localknowledge-from-crewai-knowledge/6515>\
**Category:** CrewAI Community Support\
**Tags:** tools\_issues\
**Created:** [July 9, 2025, 11:03am UTC](https://community.crewai.com/t/importerror-cannot-import-name-localknowledge-from-crewai-knowledge/6515 "2025-07-09T11:03:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jshah028](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/jshah028/32/4067_2.png) [@jshah028](https://community.crewai.com/u/jshah028)\
**Post date:** [July 9, 2025, 11:03am UTC](https://community.crewai.com/t/importerror-cannot-import-name-localknowledge-from-crewai-knowledge/6515/1 "2025-07-09T11:03:23Z")

</div>

I am getting an import error  
“Traceback (most recent call last):  
File “”, line 1, in   
ImportError: cannot import name ‘LocalKnowledge’ from ‘crewai.knowledge’ (/Users/XX/Desktop/Coding/umojah\_instagram/venv/lib/python3.10/site-packages/crewai/knowledge/ **init**.py)”

In my venv I have crewai 0.140.0 & crewai-tools 0.49.0. My python version is set to 3.10.13. Has anyone dealt with this issue before?

---

<div class="post-metadata">

**Author:** ![jshah028](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/jshah028/32/4067_2.png) [@jshah028](https://community.crewai.com/u/jshah028)\
**Post date:** [July 9, 2025, 11:05am UTC](https://community.crewai.com/t/importerror-cannot-import-name-localknowledge-from-crewai-knowledge/6515/2 "2025-07-09T11:05:36Z")

</div>

@tonykipkemboi Jambo. are you able to help. I’ve created a knowledge base for my agents and tasks but I am unable to import the tools

---

<div class="post-metadata">

**Author:** ![Tony\_Wood](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/tony_wood/32/1876_2.png) [@Tony\_Wood](https://community.crewai.com/u/Tony_Wood)\
**Post date:** [July 9, 2025, 5:35pm UTC](https://community.crewai.com/t/importerror-cannot-import-name-localknowledge-from-crewai-knowledge/6515/3 "2025-07-09T17:35:26Z")

</div>

Hi Sadly I am not Jambo. But if you can let us see the code maybe we can help

---

<div class="post-metadata">

**Author:** ![tonykipkemboi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/tonykipkemboi/32/4070_2.png) [@tonykipkemboi](https://community.crewai.com/u/tonykipkemboi)\
**Post date:** [July 10, 2025, 2:11pm UTC](https://community.crewai.com/t/importerror-cannot-import-name-localknowledge-from-crewai-knowledge/6515/4 "2025-07-10T14:11:09Z")

</div>

please share the code so we can see your implementation. this should be your crew.py file

---

<div class="post-metadata">

**Author:** ![jshah028](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/jshah028/32/4067_2.png) [@jshah028](https://community.crewai.com/u/jshah028)\
**Post date:** [July 11, 2025, 6:45am UTC](https://community.crewai.com/t/importerror-cannot-import-name-localknowledge-from-crewai-knowledge/6515/5 "2025-07-11T06:45:58Z")

</div>

Hello @Tony_Wood and @tonykipkemboi. Thank you both for reaching out. I managed to find a workaround. I was using an old import method  
“from crewai import Knowledge”  
After reading the documentation I found the following import method.  
“from crewai.knowledge.source.string\_knowledge\_source import StringKnowledgeSource” I’ll run this and see if it works.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex025/uploads/crewai/original/1X/ecda97e72f77c7100e0a761444b1c991925cc789.png) [@system](https://community.crewai.com/u/system)\
**Post date:** [July 12, 2025, 6:46am UTC](https://community.crewai.com/t/importerror-cannot-import-name-localknowledge-from-crewai-knowledge/6515/6 "2025-07-12T06:46:22Z")

</div>

Closed on July 12, 2025, 6:46am UTC

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