gpt4 book ai didi

python - celery 没有找到 python-dateutil,尽管它已安装

转载 作者:行者123 更新时间:2023-11-28 23:00:15 27 4
gpt4 key购买 nike

我激活了一个 virtualenv,我正在运行一个命令

 celery -A dnslookup worker --loglevel=info

抛出

Traceback (most recent call last):
File "/Users/myuser/dev/project-backend-ENV/bin/celery", line 5, in <module>
from pkg_resources import load_entry_point
File "/Users/myuser/dev/project-backend-ENV/lib/python2.7/site-packages/setuptools- 0.6c11-py2.7.egg/pkg_resources.py", line 2607, in <module>
File "/Users/myuser/dev/project-backend-ENV/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 565, in resolve
pkg_resources.DistributionNotFound: python-dateutil>=1.5,<2.0

但是 python-dateutil 安装在我的 virtualenv 中。

我该如何解决这个问题?

最佳答案

我猜您使用的 dateutil 版本太新了。默认情况下,将 dateutil 安装到新的 virtualenv 会得到 dateutil 2.1 版,这是行不通的(正如您的错误消息所指出的)。来自Celery changelog :

Dependency lists now explicitly specifies that we don’t want python-dateutil 2.x, as this version only supports py3k.

If you have installed dateutil 2.0 by accident you should downgrade to the 1.5.0 version:

pip install -U python-dateutil==1.5.0

关于python - celery 没有找到 python-dateutil,尽管它已安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12322767/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com