0

我正在开发一个 Django 应用程序,使用 Celery 和 RabbitMQ 作为工作者。我正在使用以下命令(在 Fedora 上)启动 Celery

python manage.py celery worker --loglevel=info

但是,我收到以下错误:

ImportError: No module named processe

在我的办公室里,我们使用的是 Ubuntu,并且没有遇到任何这样的错误。

这是完整的追溯:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/gurpinars/projects/github/Blog-Env/lib/python2.7/site-packages/django/core/management/__init__.py", line 453, in execute_from_command_line
    utility.execute()
  File "/home/gurpinars/projects/github/Blog-Env/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/gurpinars/projects/github/Blog-Env/lib/python2.7/site-packages/djcelery/management/commands/celery.py", line 22, in run_from_argv
    ['%s %s' % (argv[0], argv[1])] + argv[2:],
  File "/home/gurpinars/projects/github/Blog-Env/lib/python2.7/site-packages/celery/bin/celery.py", line 901, in execute_from_commandline
    super(CeleryCommand, self).execute_from_commandline(argv)))
  File "/home/gurpinars/projects/github/Blog-Env/lib/python2.7/site-packages/celery/bin/base.py", line 187, in execute_from_commandline
    return self.handle_argv(prog_name, argv[1:])
  File "/home/gurpinars/projects/github/Blog-Env/lib/python2.7/site-packages/celery/bin/celery.py", line 893, in handle_argv
    return self.execute(command, argv)
  File "/home/gurpinars/projects/github/Blog-Env/lib/python2.7/site-packages/celery/bin/celery.py", line 868, in execute
    return cls(app=self.app).run_from_argv(self.prog_name, argv)
  File "/home/gurpinars/projects/github/Blog-Env/lib/python2.7/site-packages/celery/bin/celery.py", line 148, in run_from_argv
    return self(*args, **options)
  File "/home/gurpinars/projects/github/Blog-Env/lib/python2.7/site-packages/celery/bin/celery.py", line 118, in __call__
    ret = self.run(*args, **kwargs)
  File "/home/gurpinars/projects/github/Blog-Env/lib/python2.7/site-packages/celery/bin/celery.py", line 220, in run
    return self.target.run(*args, **kwargs)
  File "/home/gurpinars/projects/github/Blog-Env/lib/python2.7/site-packages/celery/bin/celeryd.py", line 141, in run
    kwargs.get('pool_cls') or self.app.conf.CELERYD_POOL)
  File "/home/gurpinars/projects/github/Blog-Env/lib/python2.7/site-packages/celery/concurrency/__init__.py", line 26, in get_implementation
    return symbol_by_name(cls, ALIASES)
  File "/home/gurpinars/projects/github/Blog-Env/lib/python2.7/site-packages/kombu/utils/__init__.py", line 80, in symbol_by_name
    module = imp(module_name, package=package, **kwargs)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named processes

此外,这是我的pip freeze输出:

Django==1.5.2  
PIL==1.1.7  
amqp==1.0.13  
anyjson==0.3.3     
billiard==2.7.3.32  
celery==3.0.23  
django-celery==3.0.23     
django-debug-toolbar==0.9.4  
ipdb==0.7  
ipython==1.0.0  
kombu==2.5.14
python-dateutil==2.1
pytz==2013d  
redis==2.8.0  
six==1.4.1   
wsgiref==0.1.2

关于如何解决此问题的任何建议?

4

1 回答 1

1

问题已解决。在 ubuntu 上,rabbitmq 自动启动,但 fedora 在更改 conf 文件时必须手动启动和重新启动。

于 2013-09-29T10:37:07.373 回答