ImportError: cannot import name 'ClientApp' from 'flwr.client'
Closed this issue · 3 comments
nguyenhongson1902 commented
Describe the bug
Hey folks, I've been trying out Flower recently and come up with the error when importing ClientApp
Here is the code:
from flwr.client import ClientApp
Here is the error:
ImportError: cannot import name 'ClientApp' from 'flwr.client'
My environment:
- Ubuntu 20.04.6 LTS
- Python 3.10.10 (conda)
- flwr 1.4.0
Steps/Code to Reproduce
- Open Python in the terminal
- Run
from flwr.client import ClientApp
Expected Results
The ClientApp
should've been imported because there is a lot of tutorial-like source code that uses it.
Actual Results
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'ClientApp' from 'flwr.client' (/home/ubuntu/miniconda3/envs/pytorch-gpu/lib/python3.10/site-packages/flwr/client/__init__.py)
jafermarq commented
Hi @nguyenhongson1902 , please update to the latest version of Flower (flwr 1.10.0
)
pip install -U "flower[simulation]"
nguyenhongson1902 commented
Hi @nguyenhongson1902 , please update to the latest version of Flower (
flwr 1.10.0
)pip install -U "flower[simulation]"
Thank you for this suggestion. I fixed it via running pip install flwr==1.10.0
jafermarq commented
Great! glad to hear it is fixed now 💯