I am running an application with django, and I wanted to use celery to make some scheduled tasks.
According to the oficial docs, in my settings.py file I set the broker transport
BROKER_URL = 'django://'
and added kombu.transport.django to installed apps
INSTALLED_APPS = (
....
'kombu.transport.django',
....)
However, when I try to sync the database, with python manage.py syncdb
, i get the following error:
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 338, in execute_from_command_line
utility.execute()
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 312, in execute
django.setup()
File "C:\Python27\lib\site-packages\django\__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "C:\Python27\lib\site-packages\django\apps\config.py", line 119, in create
import_module(entry)
File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named django
Any ideas why I'm getting this? I have django installed correctly and the application runs fine if I remove kombu.transport.django
from installed apps.
Edit: this seems to be a problem with kombu. I installed it with pip install kombu
. When I try to import in a file 'kombu.transport' I get no errors, but when I try to import 'kombu.transport.django' I get an erro:
ImportError: No module named django