4

I have installed apache airflow version 2.1.2 but when I starts the worker then it says that it cannot import name FlowerCommand from flower.command.

Operating system centos 7, python version is 3.7.6, apahce-airflow version is 2.1.2, celery version is 4.4.7, flower version is 0.9.7

I have attached a scrennshot of my error for further calarificationenter image description here

  • I think you have somewhat bad environment and for some reason your flower command missess somethig.I do not know how you installed it but if you follow https://airflow.apache.org/docs/apache-airflow/stable/installation.html#installation-script airflow should install just fine and flower should work. – Jarek Potiuk Sep 12 '21 at 08:46
  • You can also try to run python and run `from flower.command import FlowerCommand` and see what errors you get – Jarek Potiuk Sep 12 '21 at 08:47

2 Answers2

7

Airflow 2.1.2 doesn't support Celery 5 yet.

Long story short: just downgrade Celery provider:

$ pip install --upgrade apache-airflow-providers-celery==2.0.0

More details are within issue:

https://github.com/apache/airflow/discussions/18115

nvolynets
  • 119
  • 3
-1

import flwr as fl ModuleNotFoundError: No module named 'flwr'

pip install flwr

If you are using Jupyter Notebook or Google Colab, you can also prepend the ! character to run the command as a shell command within the notebook:

!pip install flwr
Tech News
  • 11
  • 4
  • Your recommendation should be `%pip install flwr` for current best practice for modern Jupyter. (Google Colab is a outdated custom branch so you can continue to suggest that for there.) The magic install commands were added to insure the installation occurs in the proper environment where the kernel is running, see more [here](https://discourse.jupyter.org/t/why-users-can-install-modules-from-pip-but-not-from-conda/10722/4?u=fomightez). The exclamation point can lead to issues in some Jupyter installs, see .... – Wayne Aug 19 '23 at 00:29
  • [the second paragraph here](https://discourse.jupyter.org/t/location-of-libraries-or-extensions-installed-in-jupyterlab/16303/2?u=fomightez) for more about how the exclamation point use with installs can lead to issues and confusion. – Wayne Aug 19 '23 at 00:29