S
S
Sergey Nizhny Novgorod2017-01-12 04:59:37
Python
Sergey Nizhny Novgorod, 2017-01-12 04:59:37

Why does not see celery on windows?

Hello.
Through pip / easy_install - installed celery 4.0.2.
I'm trying to follow the example from the documentation:

from celery import Celery

app = Celery('tasks', broker='pyamqp://[email protected]//')

@app.task
def add(x, y):
    return x + y

result = add.delay(4, 4)

I get an error that there is no such component as Celery.
ImportError: cannot import name 'Celery'
I'm trying to call the class through the dot, I also get that it is not there:
download?id=pjsfrqsuuTYHk93leNsf8fZKmg81
What could be the matter?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Артём Иннокентьев, 2017-01-12
@artinnok

Почитай про virtualenv и переходи на Linux.

R
Roman Mindlin, 2017-01-12
@kgbplus

Anaconda не стоит?
Вообще проверяйте откуда pip запускается и куда ставит модули.
Посмотрите, что пишет
where pip

X
Xander017, 2017-01-12
@Xander017

In the project settings in PyCharm (on the screen like it is), look at what it costs. Just Python or Python + virtualenv.
Most likely Python + virtualenv.
And Celery is not installed in virtualenv. That's why it doesn't import.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question