brief-lock-33347
12/26/2025, 6:30 PMtall-airline-16756
12/26/2025, 6:30 PMtall-airline-16756
12/26/2025, 6:31 PMcannot import name 'liveavatar' from 'livekit.plugins'. That means the LiveAvatar plugin isn't installed inside the container where the agent runs.
To fix this, please add the LiveAvatar extra to the environment used in your Docker build. Two quick options — pick whichever matches your build:
• If you use requirements.txt, add:
livekit-agents[liveavatar]~=1.3.6
then rebuild.
• Or add an install step in your Dockerfile before running `agent.py`:
RUN uv pip install "livekit-agents[liveavatar]~=1.3.6"
Checks to confirm:
• No typos in package name or in from livekit.plugins import liveavatar.
• The installed livekit-agents version is compatible with your code.
If you share your Dockerfile or requirements.txt (or tell me whether you use `uv`/venv/poetry), I can give the exact lines to add and a short Dockerfile snippet you can paste.
Sources: LiveAvatar virtual avatar integration guide | LiveKit docs | Hedra Realtime Avatar integration guide | LiveKit docs | Tavus virtual avatar integration guide | LiveKit docs | bitHuman virtual avatar integration guide | LiveKit docsbrief-lock-33347
12/26/2025, 6:32 PMbrief-lock-33347
12/26/2025, 6:33 PMtall-airline-16756
12/26/2025, 6:33 PMlivekit-agents[liveavatar]~=1.3.6, so the ImportError suggests the plugin still isn't available when python agent.py download-files runs. Two likely causes and fixes:
1) Ensure the venv is active for every `uv pip`/`python` call in the Docker build
• Replace RUN python agent.py download-files with:
RUN /app/venv/bin/python agent.py download-files
This guarantees the build-time Python uses the same virtualenv where uv venv installed packages.
2) Install the plugin via requirements (optional alternative)
• Add the extra to requirements.txt (or ensure it's installed before download step), e.g.:
livekit-agents[liveavatar]~=1.3.6
and then:
RUN uv pip install -r requirements.txt --upgrade
before running download-files.
Recommended minimal change (apply this and rebuild):
• Change the download step to call the venv python:
RUN /app/venv/bin/python agent.py download-files
If the error persists, please paste the output of:
• RUN /app/venv/bin/pip show livekit-agents (as a Dockerfile RUN line) and
• the top of agent.py (first ~20 lines) so I can confirm the import path.tall-airline-16756
12/26/2025, 6:33 PMuv pip install "livekit-agents[liveavatar]~=1.3.6" but your requirements list also includes a long livekit-agents[...]==1.3.6 line that contains liveavatar plus a separate livekit-agents[liveavatar]~=1.3.6. This can cause conflicting installs or pip resolution oddities during the build.
What to do next (pick one):
1) Simplest — move the plugin into requirements.txt and remove the separate install line:
• In requirements.txt keep one entry:
livekit-agents[openai,silero,deepgram,cartesia,turn-detector,bithuman,elevenlabs,google,tavus,liveavatar]==1.3.6
• Remove the RUN uv pip install "livekit-agents[liveavatar]~=1.3.6" line from the Dockerfile.
• Rebuild.
2) Or keep Dockerfile install and simplify requirements.txt so it does NOT re-declare livekit-agents (avoid duplicate/conflicting declarations). For example remove the long livekit-agents[...]==1.3.6 line from requirements.txt and leave other packages (python-dotenv, bithuman, elevenlabs) there.
Additional checks after changing:
• Build the image and verify pip list inside the image includes livekit-agents and the plugin subpackage (same version).
• Ensure no stray spaces or extra commas in the extras list (e.g., ..., bithuman, elevenlabs, google, ... should not include duplicate spacing or trailing commas).
• If the import still fails, share the output of running inside the built image:
a. docker run --rm -it <image> /bin/sh
b. python -c "import pkgutil, importlib; print('livekit-agents' in [p.name for p in pkgutil.iter_modules()]); import importlib; print(importlib.import_module('livekit.plugins'))"
(I can help interpret the output.)
Tell me which option you prefer or paste your updated requirements.txt and I’ll give the exact Dockerfile edits to use.