ImportError:没有名为'celery'的模块

时间:2015-04-21 06:39:49

标签: python celery virtualenv

在遵循this guide

的指示时,请出现此错误消息
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/celery/tasks.py", line 1, in <module> from celery import Celery
ImportError: No module named 'celery'`

我正在使用安装了芹菜的虚拟环境。

我的命令是这样的:

#ran the celery app
$ source venv/bin/activate
$ celery -A tasks worker --loglevel=info

#then on another terminal
$ source venv/bin/activate
$ python
$ from tasks import add'

我在这里错过了什么吗?

1 个答案:

答案 0 :(得分:1)

似乎芹菜3.1与Python 3.4.3不兼容

我转而使用Python 2.7.3,现在导入工作

相关问题