报错内容:
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 版本不对
错误的 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: [email protected]
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