5

I am trying to use django + celery + rabbitmq + flower, but after i downloaded flower using pip3:

Collecting flower
  Using cached flower-0.9.5-py2.py3-none-any.whl (459 kB)
Requirement already satisfied: celery>=4.3.0; python_version >= "3.7" in /home/denys/env2/myshop/lib/python3.8/site-packages (from flower) (5.0.0)
Requirement already satisfied: humanize in /home/denys/env2/myshop/lib/python3.8/site-packages (from flower) (2.6.0)
Requirement already satisfied: pytz in /home/denys/env2/myshop/lib/python3.8/site-packages (from flower) (2020.1)
Requirement already satisfied: tornado<7.0.0,>=5.0.0; python_version >= "3.5.2" in /home/denys/env2/myshop/lib/python3.8/site-packages (from flower) (6.0.4)
Requirement already satisfied: prometheus-client==0.8.0 in /home/denys/env2/myshop/lib/python3.8/site-packages (from flower) (0.8.0)
Requirement already satisfied: vine<6.0,>=5.0.0 in /home/denys/env2/myshop/lib/python3.8/site-packages (from celery>=4.3.0; python_version >= "3.7"->flower) (5.0.0)
Requirement already satisfied: click-didyoumean>=0.0.3 in /home/denys/env2/myshop/lib/python3.8/site-packages (from celery>=4.3.0; python_version >= "3.7"->flower) (0.0.3)
Requirement already satisfied: billiard<4.0,>=3.6.3.0 in /home/denys/env2/myshop/lib/python3.8/site-packages (from celery>=4.3.0; python_version >= "3.7"->flower) (3.6.3.0)
Requirement already satisfied: click-repl>=0.1.6 in /home/denys/env2/myshop/lib/python3.8/site-packages (from celery>=4.3.0; python_version >= "3.7"->flower) (0.1.6)
Requirement already satisfied: click>=7.0 in /home/denys/env2/myshop/lib/python3.8/site-packages (from celery>=4.3.0; python_version >= "3.7"->flower) (7.1.2)
Requirement already satisfied: kombu<6.0,>=5.0.0 in /home/denys/env2/myshop/lib/python3.8/site-packages (from celery>=4.3.0; python_version >= "3.7"->flower) (5.0.2)
Requirement already satisfied: six in /home/denys/env2/myshop/lib/python3.8/site-packages (from click-repl>=0.1.6->celery>=4.3.0; python_version >= "3.7"->flower) (1.15.0)
Requirement already satisfied: prompt-toolkit in /home/denys/env2/myshop/lib/python3.8/site-packages (from click-repl>=0.1.6->celery>=4.3.0; python_version >= "3.7"->flower) (3.0.7)
Requirement already satisfied: amqp<6.0.0,>=5.0.0 in /home/denys/env2/myshop/lib/python3.8/site-packages (from kombu<6.0,>=5.0.0->celery>=4.3.0; python_version >= "3.7"->flower) (5.0.1)
Requirement already satisfied: wcwidth in /home/denys/env2/myshop/lib/python3.8/site-packages (from prompt-toolkit->click-repl>=0.1.6->celery>=4.3.0; python_version >= "3.7"->flower) (0.2.5)
Installing collected packages: flower
Successfully installed flower-0.9.5

in my virtual env, when i tried to use

 celery -A myshop flower

with celery and rabbitmq running i got this error:

Error: No such command 'flower'.

Did you mean one of these?
    worker

I have done this in the same directory:

/home/denys/env2/myshop/myshop

end when i am using celery --help, there is no flower command:

Commands:
  amqp     AMQP Administration Shell.
  beat     Start the beat periodic task scheduler.
  call     Call a task by name.
  control  Workers remote control.
  events   Event-stream utilities.
  graph    The ``celery graph`` command.
  inspect  Inspect the worker at runtime.
  list     Get info from broker.
  logtool  The ``celery logtool`` command.
  migrate  Migrate tasks from one broker to another.
  multi    Start multiple worker instances.
  purge    Erase all messages from all known task queues.
  report   Shows information useful to include in bug-reports.
  result   Print the return value for a given task id.
  shell    Start shell session with convenient access to celery symbols.
  status   Show list of workers that are online.
  upgrade  Perform upgrade between versions.
  worker   Start worker instance.

And also i tried to use:

celery flower -A myshop

What should i change? Thank you)

Denys
  • 539
  • 1
  • 6
  • 9
  • Pleas read https://flower.readthedocs.io/en/latest/install.html#usage. Flower is not installed – Daviddd Sep 26 '20 at 08:52
  • I removed it and installed one more time:`(myshop) denys@denys-HP-250-G6-Notebook-PC:~/env2/myshop/myshop$ pip3 show flower Name: flower Version: 0.9.5 Summary: Celery Flower Home-page: https://github.com/mher/flower Author: Mher Movsisyan Author-email: mher.movsisyan@gmail.com License: BSD Location: /home/denys/env2/myshop/lib/python3.8/site-packages Requires: humanize, celery, tornado, pytz, prometheus-client Required-by: ` – Denys Sep 26 '20 at 09:22
  • The [1.0.0](https://github.com/mher/flower/issues/1029#issuecomment-873243638) release lets us use [celery>=5.0.5](https://github.com/mher/flower/blob/1.0/requirements/default.txt) – shad0w_wa1k3r Apr 15 '22 at 17:46

3 Answers3

10

Looks like the latest version of flower doesn't yet support celery v5.0.0 as of 10/1/20.

As Артур mentioned, dropping to 4.4.7 should resolve the issue.

Dan Kras
  • 138
  • 4
  • Upgrading to Celery 5.0.0 breaks flower due to change in celery.bin.base module. #1029 https://github.com/mher/flower/issues/1029 – José Ibañez Oct 02 '20 at 19:06
  • 1
    The [1.0.0](https://github.com/mher/flower/issues/1029#issuecomment-873243638) release lets us use [celery==5.0.5](https://github.com/mher/flower/blob/1.0/requirements/default.txt) – shad0w_wa1k3r Apr 15 '22 at 17:18
2

Use celery 4.4.7 version mb will solve the problem !

-1

Try this :

celery flower -A myshop --address=127.0.0.1 --port=5555

You can address to whatever is the IP of your rabbit server (in case it is not on local) .

Also try if you will get flower listed when you execute pip freeze .

Sowjanya R Bhat
  • 1,128
  • 10
  • 19