解决办法,在后面加上(:celery_)(此处的celery_为以下celery的设置) celery -A flaskProject.app:celery_ worker --loglevel=info celery_ = Celery("tasks", broker=app.config['CELERY_BROKER_URL']) 项目结构