celery 使用 click报错
报错内容:
vagrant@vagrant:/vagrant$ celery
Traceback (most recent call last):
File "/home/vagrant/.local/bin/celery", line 8, in
sys.exit(main())
File "/home/vagrant/.local/lib/python3.6/site-packages/celery/__main__.py", line 14, in main
from celery.bin.celery import main as _main
File "/home/vagrant/.local/lib/python3.6/site-packages/celery/bin/celery.py", line 14, in
from celery.app.utils import find_app
File "/home/vagrant/.local/lib/python3.6/site-packages/celery/app/__init__.py", line 7, in
from .base import Celery
File "/home/vagrant/.local/lib/python3.6/site-packages/celery/app/base.py", line 11, in
from click.exceptions import Exit
ImportError: cannot import name 'Exit'
原因,click 版本不对
【celery 使用 click报错】错误的 click
vagrant@vagrant:/vagrant$ pip show click
Name: click
Version: 6.7
Summary: A simple wrapper around optparse for powerful command line utilities.
Home-page: http://github.com/mitsuhiko/click
Author: Armin Ronacher
Author-email: armin.ronacher@active-4.com
License: UNKNOWN
Location: /home/vagrant/.local/lib/python3.6/site-packages
Requires:
Required-by: click-repl, click-plugins, click-didyoumean, celery
正确的 click
vagrant@vagrant:/vagrant$ pip show click
Name: click
Version: 7.1.2
Summary: Composable command line interface toolkit
Home-page: https://palletsprojects.com/p/click/
Author:
Author-email:
License: BSD-3-Clause
Location: /home/vagrant/.local/lib/python3.6/site-packages
Requires:
Required-by: click-repl, click-plugins, click-didyoumean, celery
推荐阅读
- 由浅入深理解AOP
- 【译】20个更有效地使用谷歌搜索的技巧
- mybatisplus如何在xml的连表查询中使用queryWrapper
- MybatisPlus|MybatisPlus LambdaQueryWrapper使用int默认值的坑及解决
- MybatisPlus使用queryWrapper如何实现复杂查询
- iOS中的Block
- Linux下面如何查看tomcat已经使用多少线程
- 使用composer自动加载类文件
- android|android studio中ndk的使用
- 使用协程爬取网页,计算网页数据大小