在Windows ImportError上运行Celery Server

时间:2018-05-25 03:44:30

标签: python celery

我正在根据官方文档学习Celery,并且无法运行工作服务器。我跟着this并安装了eventlet,但收到此错误:

Traceback (most recent call last):
  File "C:\Anaconda3\Lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Anaconda3\Lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\Scraper\CeleryEnv\Scripts\celery.exe\__main__.py", line 9, in <module>
  File "d:\scraper\celeryenv\lib\site-packages\celery\__main__.py", line 14, in main
    maybe_patch_concurrency()
  File "d:\scraper\celeryenv\lib\site-packages\celery\__init__.py", line 146, in maybe_patch_concurrency
    concurrency.get_implementation(pool)
  File "d:\scraper\celeryenv\lib\site-packages\celery\concurrency\__init__.py", line 23, in get_implementation
    return symbol_by_name(cls, ALIASES)
  File "d:\scraper\celeryenv\kombu\utils\imports.py", line 56, in symbol_by_name
    module = imp(module_name, package=package, **kwargs)
  File "d:\scraper\celeryenv\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "d:\scraper\celeryenv\lib\site-packages\celery\concurrency\eventlet.py", line 7, in <module>
    from kombu.asynchronous import timer as _timer  # noqa
ImportError: cannot import name 'timer'

在Windows 10平台上,芹菜版本为4.1.1,事件版本为0.23.0。 我检查了包目录,timer.py在kombu / asynchronous下。我无法弄清楚如何解决此错误。我试过celery-3.1.25,工作正常,这是唯一的选择吗?

0 个答案:

没有答案