zsh:找不到命令:芹菜

zsh: command not found: celery

每当我 运行 celery -A reminders worker -l INFO --detach,我都会收到以下错误: zsh: command not found: celery 我的假设是错误存在于我的路径变量中,因为这是“找到”这些命令的地方。

$ echo $PATH

$ /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

当我运行pip3 install celery时,我发现

Requirement already satisfied: celery in /Users/caineardayfio/Library/Python/3.8/lib/python/site-packages (5.1.2)

Requirement already satisfied: click<8.0,>=7.0 in /Users/caineardayfio/Library/Python/3.8/lib/python/site-packages (from celery) (7.1.2)

...

Requirement already satisfied: amqp<6.0.0,>=5.0.6 in /Users/caineardayfio/Library/Python/3.8/lib/python/site-packages (from kombu<6.0,>=5.1.0->celery) (5.0.9)

Requirement already satisfied: wcwidth in /Users/caineardayfio/Library/Python/3.8/lib/python/site-packages (from prompt-toolkit->click-repl>=0.1.6->celery) (0.2.5)

有人知道解决此类错误的方法吗?谢谢!

你应该试试python3 -m celery -A reminders worker -l INFO --detach –