Trying to get DuckDuckGo search leads to "Could not import duckduckgo-search python package" error

Hi I am trying to get DuckDuckGo Search (from langchain_community.tools import DuckDuckGoSearchRun) to run as a custom tool but always ending up in the error message: Could not import duckduckgo-search python package

I tried it locally on my mac and in doubt could be in conflict with miniconda set up a fresh docker container, one with a pre installed “CrewAI” and one just
Ubuntu 22 following the installtion guide of crewAI to get everything installed.

In all ways I end up in that message.

I checked where this message was raised it’s this part:
def validate_environment(cls, values: Dict) → Any:
“”“Validate that python package exists in environment.”“”
try:
from duckduckgo_search import DDGS # noqa: F401
except ImportError:
raise ImportError(
"Could not import duckduckgo-search python package. "
“Please install it with pip install -U duckduckgo-search.”
)
return values

Has anyone of you guys got that running or do you have any suggestion what I could try next? Your help is highly appreciated.
Thanks

pip install duckduckgo-search

This should solve that issue

Thanks for your answer.
Unfortunately this does not solve the issue. I checked the .venv folder and the package is installed but the error message still appears.

did you install it within your venv? This is something i run into every time i make a new virtual enviroment. Also are you running local llms or hosted?