django使用redis报错:Could not find backend 'django_redis.cache.RedisCache': cannot import name 'six'

一开始用django的redis不会报错,之后就每次都出现以下错误,后来发现是django版本问题

django使用redis报错:Could not find backend 'django_redis.cache.RedisCache': cannot import name 'six'_第1张图片

    "Could not find backend '%s': %s" % (backend, e))
django.core.cache.backends.base.InvalidCacheBackendError: Could not find backend 'django_redis.cache.RedisCache': cannot import name 'six'

做个吃螃蟹的前列人员也是不错的体验,最近突然发现用着的django居然是3.0版本的,偶然发现还是12月发布的。

参考链接:
https://stackoverflow.com/questions/59245439/django-core-cache-backends-base-invalidcachebackenderror-could-not-find-backend

解决方法之一:安装django2

pip install django==2.2.7

你可能感兴趣的:(Django的web项目,django-redis)