I've just installed python-kasa via pip install python-kasa on an Ubuntu 22.04.5 LTS machine. Running some of the sample code works fine, but trying to run anything using the CLI (even just kasa --help) using the cli returns a ModuleNotFoundError. I see that in #990 this was removed as a dependency, and of course installing anyio myself fixes this but I wanted to report the problem.
Example showing the issue:
kasa --help
Traceback (most recent call last):
File "/home/david/.local/bin/kasa", line 3, in
from kasa.cli.main import cli
File "/home/david/.local/lib/python3.10/site-packages/kasa/cli/main.py", line 3, in
from kasa.cli.main import cli
File "/home/david/.local/lib/python3.10/site-packages/kasa/cli/main.py", line 13, in
import asyncclick as click
File "/home/david/.local/lib/python3.10/site-packages/asyncclick/init.py", line 10, in
from .core import Argument as Argument
File "/home/david/.local/lib/python3.10/site-packages/asyncclick/core.py", line 39, in
from .termui import confirm
File "/home/david/.local/lib/python3.10/site-packages/asyncclick/termui.py", line 13, in
import anyio
ModuleNotFoundError: No module named 'anyio'
There hasn't been any activity on this issue recently. This issue has been automatically marked as stale because of that. It will be closed if no further activity occurs.
Please make sure to update to the latest python-kasa version and check if that solves the issue.
Thank you for your contributions.
Activity
github-actions commented on Feb 24, 2026
There hasn't been any activity on this issue recently. This issue has been automatically marked as stale because of that. It will be closed if no further activity occurs.
Please make sure to update to the latest python-kasa version and check if that solves the issue.
Thank you for your contributions.