'ImportError: No module named redis_cache
I am using Django=1.5.4 and I have installed redis properly in ubuntu. I installed django-redis. But I get this error. I put 'redis_cache' in my django settings. But I got this error
ImportError: No module named redis_cache
What to do?
Solution 1:[1]
You are supposed to add django_redis instead of redis_cache.
The documentation says:
if you are coming from
django-redis < 3.8.x, you are probably usingredis_cache. Since django-redis 3.8.x,redis_cachemodule is deprecated in favor todjango_redis. Theredis_cachemodule will be removed in 3.9.x versions.
Solution 2:[2]
Redis cache backend for Django
Run python setup.py install to install, or place django_redis on your Python path.
You can also install it with: pip install django-redis
Solution 3:[3]
Use following command as available at this:
pip install redis-simple-cache
Solution 4:[4]
you are missing django_redis module run below command to add the module:
pip install django-redis
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | v1k45 |
| Solution 2 | GrvTyagi |
| Solution 3 | DeyaEldeen |
| Solution 4 | Syscall |
