Import boto from local library
Posted
by
ensnare
on Stack Overflow
See other posts from Stack Overflow
or by ensnare
Published on 2012-03-13T20:45:39Z
Indexed on
2012/03/19
2:04 UTC
Read the original article
Hit count: 293
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.
© Stack Overflow or respective owner