(venv) rhythmvij@Rhythms-MacBook-Pro-3 voiceagentm...
# ask-ai
r
(venv) rhythmvij@Rhythms-MacBook-Pro-3 voiceagentmulti % python3 agentMulti.py console Traceback (most recent call last): File "/Users/rhythmvij/Desktop/LupitorNewProjects/VoiceAgentMultiDeploy/voiceagentmulti/agentMulti.py", line 15, in <module> from livekit.agents.multimodal import MultimodalAgent ModuleNotFoundError: No module named 'livekit.agents.multimodal' (venv) rhythmvij@Rhythms-MacBook-Pro-3 voiceagentmulti % pip freeze > reqs.txt zsh: command not found: pip (venv) rhythmvij@Rhythms-MacBook-Pro-3 voiceagentmulti % pip3 freeze > reqs.txt (venv) rhythmvij@Rhythms-MacBook-Pro-3 voiceagentmulti % git add requirements
t
Thanks for reaching out, Rhythm. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! The error
ModuleNotFoundError: No module named 'livekit.agents.multimodal'
usually means the module isn’t installed or your environment can’t find it. No worries, here’s how you can fix it: 1. First, make sure you’ve got the LiveKit Agents package installed by running:
pip install livekit-agents
2. Next, double-check that you’re using a compatible version. The
livekit.agents.multimodal
module shows up in versions 0.12.11 and above, but before 1.0.0. You can install the right version with:
pip install "livekit-agents>=0.12.11,<1.0.0"
3. Don’t forget to activate your virtual environment before running your script so Python knows where to look for the package. 4. Also, take a quick peek at your import statement to make sure it’s spot on:
from livekit.agents.multimodal import MultimodalAgent
If you’re still running into trouble, try this simple test script to see if the module loads properly:
Copy code
# test_script.py
from livekit.agents.multimodal import MultimodalAgent
print("Module imported successfully")
One last thing—make sure
pip
is installed and working in your environment. If
pip
isn’t recognized, you might need to install it or try using
pip3
instead.
r
what is the import after 1.0.0
t
Hey there! Just a heads-up: the
MultimodalAgent
module is no longer used in LiveKit Agents version 1.0.0 and beyond. It’s been swapped out for
AgentSession
. That said, the exact import path for
AgentSession
isn’t clearly mentioned in the docs right now. No worries though! You might want to peek at the package documentation or explore the module structure in your installed version to find it. And if you’re still stuck or want a hand, just give me a shout—I’m happy to connect you with a specialist who can clear things up. Sources: Agents 0.x migration guide | LiveKit Docs