2
votes

I'm trying to run my boto script but I get the following error:

ImportError: No module named boto.swf.layer2

According to pip freeze I have boto installed so I'm wondering what has gone wrong here.

My Python path is as follows:

['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']

My boto path is as follows:

/usr/lib/python2.7/dist-packages/boto/__init__.pyc

Does this mean it is some sort of error to do with the Python path? I'm really lost about how to debug this.

1
Looks like it's not a problem with the path, but with a missing module or a wrong module name. - user1220978

1 Answers

3
votes

First I'd verify you can at least import boto:

import boto
print boto.__file__

Verify that this is in /usr/lib/python2.7/dist-packages/boto/__init__.pyc.

If that works then I'd check your boto version:

import boto
print boto.__version__

The specific module you're trying to import was added to boto in 2.7.0 so you'll need at least that version.