I am new in Python and I am trying to follow this tutorial.
I am using Python 3.12.2.
I followed until the end of Retrieval Chain.
I am running it using ollama to run it locally.
But when I tried to run my main.py file I got the following error:
Traceback (most recent call last):
File "/home/myUser/repos/python/myFirstProject/main.py", line 1, in <module>
from langchain_community.llms import Ollama
ModuleNotFoundError: No module named 'langchain_community'
My environment is active and all the packages are installed in the environment, because when I run pip list shows all the packages installed and there is the langchain-community:
|Package|Version|
|-|-|
|other packages...|x.x.x|
|langchain|0.1.13|
|langchain-cli|0.0.21|
|langchain-community|0.0.29|
|langchain-core|0.1.34|
|langchain-text-splitters|0.0.1|
|langserve|0.0.51|
|langsmith|0.1.33|
|other packages...|x.x.x|
I tried reinstalling the packages again but still have the same result.
I am using PyCharm and all of the packages mentioned before are in the folder: .venv/include/lib/python3.12/site-packages. Even when I go to file -> settings -> Project:myProjectName -> Python Interpreter it shows the same Python version in the interpreter and it list all of the packages installed.
I am using wsl2, Ubuntu-22.04 and PyCharm got the interpreter from there, so I don't think those thinks are the problem.