18

I have followed the very terse guide provided for django-storages, transitioned from local file storage, and have come up against this exception:

Could not load Boto's S3 bindings.

settings.py

DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
AWS_ACCESS_KEY_ID = "xxxxxx"
AWS_SECRET_ACCESS_KEY = "xxxxxxxxx"
AWS_STORAGE_BUCKET_NAME = "images"

models.py

class CameraImage(models.Model):
...
image = models.ImageField(upload_to='images')#get_image_path)

What does that exception mean? How do I fix it?

Chris Martin
  • 30,334
  • 10
  • 78
  • 137
michael
  • 2,577
  • 5
  • 39
  • 62
  • duplicate here too: https://stackoverflow.com/questions/13374247/django-storages-could-not-load-amazons-s3-bindings-errors/44728875#44728875 – MrE Sep 13 '17 at 16:35

2 Answers2

35

From looking at the source code, it appears you need to have the python-boto library installed. This is also mentioned in the documentation you link to.

Brian Neal
  • 31,821
  • 7
  • 55
  • 59
  • Thanks! This saved me a bunch of time. – Ryan Walton Sep 13 '14 at 14:37
  • 8
    If you use `storages.backends.s3boto3.S3Boto3Storage` instead of `storages.backends.s3boto.S3BotoStorage`, you will need both `boto` and `boto3` to be installed. – Flimm Feb 21 '17 at 09:17
14

There's been an update it's now "pip install boto"

JamesJGarner
  • 185
  • 2
  • 12