Import boto from local library
- by ensnare
I'm trying to use boto as a downloaded library, rather than installing it globally on my machine. I'm able to import boto, but when I run boto.connect_dynamodb() I get an error:
ImportError: No module named dynamodb.layer2
Here's my file structure:
project/
project/
__init__.py
libraries/
__init__.py
flask/
boto/
views/
....
modules/
__init__.py
db.py
....
templates/
....
static/
....
runserver.py
And the contents of the relevant files as follows:
project/project/modules/db.py
from project.libraries import boto
conn = boto.connect_dynamodb(
aws_access_key_id='<YOUR_AWS_KEY_ID>',
aws_secret_access_key='<YOUR_AWS_SECRET_KEY>')
What am I doing wrong? Thanks in advance.