3

I'm trying to connect to Amazon s3 from a Django application running on Amazon ec2 to upload and serve media files. I'm using django-storages to connect to s3 via the python boto library.

I can get this to work on my local machine using the django built in web server without a problem but when I deploy the project on Amazon ec2 I get the following error:

ImproperlyConfigured
The installed Boto library must be 2.4 or higher.
See https://github.com/boto/boto

I'm running my application in a virtual environment and I have confirmed that the version of boto installed is 2.9. I've confirmed that this is the version that django is accessing by running

python manage.py shell

and importing boto then printing the version.

Here is the relevant snippet of my settings.py:

DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
MEDIA_ROOT = ''
MEDIA_URL = '/media/'
4

0 回答 0