This article mainly introduces the reason and solution of the error report when using celery to run on Windows in Python: mport grp ModuleNotFoundError: No module named’grp’.
Run the command:
celery -A tasks worker --loglevel=INFO
Error message:
File "d:\cjavapy\celery-demo\venv\lib\site-packages\celery\platforms.py",
line 9, in import grp ModuleNotFoundError: No module named 'grp'
problem causes:
Using the PyPi package django-celery-beat
, it will install the latest version of the required package celery instead of installing a compatible version (when I publish this content, that is, May 25, 2021, at this time v5.1.0), it seems to be compatible with django-celery-beat
Version 2.2.0 (the latest) and Windows operating system have compatibility issues.
Related instructions : https://docs.celeryproject.org/en/stable/changelog.html#id2
Solution:
pip uninstall celery
pip install celery==5.0.5