Error running agent

Hi everyone,

I’m trying to follow the tutorial from the Phi Data documentation to run an agent using the command python 01_web_search.py. However, I’m encountering the following error:

from phi.agent import Agent
ModuleNotFoundError: No module named ‘phi’

It seems that the phi module is not installed or cannot be found. I’m not sure what I’m missing here.

Here are some additional details about my setup:

  • Operating System: M1 pro OS sequoia
  • Python version: 3.9.3
  • Installation method:
    python3 -m venv ~/.venvs/aienv
    source ~/.venvs/aienv/bin/activate
    pip install -U phidata openai
    pip install duckduckgo-search
    python web_search.py

this was a python path problem able to resolve it with the switch to python to python3

python3 01_web_search.py

Hey @gaj, just wanted to confirm is this issue is now resolved?

yes this issue is resolved