In order to use Celery in a Windows environment, you must perform the following procedure:
- Go to System Properties | Environment Variables | User or System variables | New.
- Set the following values:
- Variable name: FORKED_BY_MULTIPROCESSING
- Variable value: 1
The reason for this setup is because of Celery's dependence on the billiard package (https://github.com/celery/billiard), which uses the FORKED_BY_MULTIPROCESSING variable.
For more information on Celery's Windows setup, read https://www.distributedpython.com/2018/08/21/celery-4-windows/.