django - ModuleNotFoundError:没有名为“storages.backends.s3boto”的模块
问题描述
所以,我已经安装了 django storages 和 boto + boto3。它们在我的 requirements.txt 中,我确保在我的虚拟环境中安装它。要求显然是我的根源。为什么我仍然收到此错误?
要求.txt
beautifulsoup4==4.8.2
boto==2.49.0
boto3==1.14.16
botocore==1.17.16
dj-database-url==0.5.0
Django==2.2.3
django-bootstrap4==1.1.1
django-storages==1.9.1
djangorestframework==3.10.2
docutils==0.15.2
gunicorn==20.0.4
jmespath==0.10.0
Markdown==3.1.1
pbr==5.4.5
Pillow==7.0.0
psycopg2-binary==2.8.5
pygame==1.9.6
python-dateutil==2.8.1
pytz==2019.1
s3transfer==0.3.3
six==1.14.0
soupsieve==2.0
sqlparse==0.3.0
stevedore==1.32.0
urllib3==1.25.9
virtualenv==16.6.1
virtualenv-clone==0.5.4
virtualenvwrapper==4.8.4
whitenoise==5.1.0
设置.py
import six
import os
from boto.s3.connection import OrdinaryCallingFormat
from storages.backends.s3boto import S3BotoStorage
解决方案
而不是from storages.backends.s3boto import S3BotoStorage
你应该使用from storages.backends.s3boto3 import S3Boto3Storage
推荐阅读
- node.js - 节点js amqplib,消费者缓存中的回调来自父函数的参数
- c - dbus 信号中收到的消息与发送的数据不匹配
- javascript - 为什么我的图像和信息不能在我的 React localhost 上呈现?
- react-native - 适用于 React Native 的 FreshChat SDK:横向模式
- web-component - 可以请求另一个 HTML URL 并将其注入它的影子 DOM 的 Web 组件
- sql - 日期函数的问题
- api - 将带有文件的 Postman 表单数据请求转换为 .NET Core API 的 cURL
- c++ - Xcode 13 无法在 Rosetta 下编译 SFML c++ 程序
- hasura - Hasura 迁移存储在 DB 中的什么位置?
- javascript - 检查表格而不提交?