"ImportError: cannot import name Exchange" when using Celery w/ Kombu installed

Posted by alukach on Stack Overflow See other posts from Stack Overflow or by alukach
Published on 2012-10-15T17:36:40Z Indexed on 2012/10/15 23:02 UTC
Read the original article Hit count: 283

Filed under:
|
|
|
|

I'm trying to create a Celery worker node on an Amazon EC2 Windows2008 R2 instance. Due to a plugin we require for another Python module, we are required to user Python3. I've installed Python3.2 and necessary modules and run Celery, but for some reason it states that it can't import Exchange and Queue from Kombu, despite the face that Kombu is installed and can be imported by python.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.   

C:\Users\Administrator>celery
Traceback (most recent call last):
  File "C:\Python32\Scripts\celery-script.py", line 9, in <module>
    load_entry_point('celery==3.0.11', 'console_scripts', 'celery')()
  File "C:\Python32\lib\site-packages\celery\__main__.py", line 13, in main
    from celery.bin.celery import main
  File "C:\Python32\lib\site-packages\celery\bin\celery.py", line 21, in <module>
    from celery.utils import term
  File "C:\Python32\lib\site-packages\celery\utils\__init__.py", line 22, in <module>
    from kombu import Exchange, Queue
ImportError: cannot import name Exchange    

C:\Users\Administrator>python
Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from kombu import Exchange, Queue
>>> print('WTF?!?')
WTF?!?
>>>

This problem seems similar to this and this, but I have not been able to remedy the issue. Any ideas?

© Stack Overflow or respective owner

Related posts about python

Related posts about Windows