the module importing in celery.py
from celery import Celery
the module importing in redis.py
from redis import StrictRedis
what’s my problem?
Django allow the file name the same with the third-party package name.
How the django to import the modules that name is the same with the file name.
If I do that without django, the program will be broken down and the error “The module cannot import name Celery was not found” will be raise.
2
Answers
I find the mistake that I get this error because I run the program with python2.7. It's ok in python3.5.
It isn't a bug about celery or redis.
I think the logic of module importing in python2.7 is different with that in python3.5.
I think it is not about wrong file name etc. I think you didn’t install library properly or your python path to packages are wrong.
Run it in your current environment and try again.