gpt4 book ai didi

python - 导入错误 : No module named redis_cache

转载 作者:IT王子 更新时间:2023-10-29 05:58:43 26 4
gpt4 key购买 nike

我正在使用 Django=1.5.4 并且我已经在 ubuntu 中正确安装了 redis。我安装了 django-redis。但是我得到了这个错误。我将“redis_cache”放入我的 Django 设置中。但是我得到了这个错误

ImportError: No module named redis_cache

怎么办?

最佳答案

您应该添加 django_redis而不是 redis_cache .

documentation说:

if you are coming from django-redis < 3.8.x, you are probably using redis_cache. Since django-redis 3.8.x, redis_cache module is deprecated in favor to django_redis. The redis_cache module will be removed in 3.9.x versions.

关于python - 导入错误 : No module named redis_cache,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36251291/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com