简单的芹菜运行 - ImportError:没有名为celery的模块

时间:2014-11-17 11:38:43

标签: python celery

尝试运行一个简单的例子 http://celery.readthedocs.org/en/latest/getting-started/next-steps.html

我收到ImportError: No module named celery(可能是由于from celery import Celery)。 在python shell上它完美地工作。 正在运行:运行python <proj dir>/celery_manager.py worker确实有效...
我做错了什么?

完整转储:

celery multi v3.1.16 (Cipater)
> Starting nodes...
Traceback (most recent call last):
  File "/usr/lib64/python2.6/runpy.py", line 122, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.6/runpy.py", line 34, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.6/site-packages/celery/__main__.py", line 54, in <module>
    main()
  File "/usr/lib/python2.6/site-packages/celery/__main__.py", line 30, in main
    main()
  File "/usr/lib/python2.6/site-packages/celery/bin/celery.py", line 81, in main
    cmd.execute_from_commandline(argv)
  File "/usr/lib/python2.6/site-packages/celery/bin/celery.py", line 769, in execute_from_commandline
    super(CeleryCommand, self).execute_from_commandline(argv)))
  File "/usr/lib/python2.6/site-packages/celery/bin/base.py", line 305, in execute_from_commandline
    argv = self.setup_app_from_commandline(argv)
  File "/usr/lib/python2.6/site-packages/celery/bin/base.py", line 465, in setup_app_from_commandline
    self.app = self.find_app(app)
  File "/usr/lib/python2.6/site-packages/celery/bin/base.py", line 485, in find_app
    return find_app(app, symbol_by_name=self.symbol_by_name)
  File "/usr/lib/python2.6/site-packages/celery/app/utils.py", line 248, in find_app
    symbol_by_name=symbol_by_name, imp=imp,
  File "/usr/lib/python2.6/site-packages/celery/app/utils.py", line 232, in find_app
    sym = imp(app)
  File "/usr/lib/python2.6/site-packages/celery/utils/imports.py", line 101, in import_from_cwd
    return imp(module, package=package)
  File "/usr/lib64/python2.6/contextlib.py", line 34, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/lib/python2.6/site-packages/celery/utils/imports.py", line 64, in cwd_in_path
    yield cwd
  File "/usr/lib/python2.6/site-packages/celery/utils/imports.py", line 101, in import_from_cwd
    return imp(module, package=package)
  File "/usr/lib/python2.6/site-packages/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named celery

0 个答案:

没有答案