ModuleNotFoundError: No module named 'boto'
Fixes legacy AWS code importing boto (v2) in environments without it. Use when old tutorials or scripts import boto. Not for boto3 (different package).
TL;DR: Your script wants boto, the original AWS SDK for Python (v2), which is not installed. Quick fix: pip install boto. Real fix: migrate to boto3; boto is unmaintained.
ModuleNotFoundError: No module named 'boto'Fix it
- Stopgap: pip install boto. Expected: the import works.
- Better: migrate to boto3. conn = boto.connects3() becomes boto3.client('s3'); bucket lookups become client.listbuckets(). Expected: modern, maintained code.
- Verify: python -c "import boto3; print(boto3.version)". Expected: a version.
- Update requirements: replace boto with boto3.
When this applies
- The code does import boto (not boto3) and the package is missing.
When it doesn't
- The code imports boto3: that is the modern package; install boto3.
- boto is installed but broken on Python 3.12+: boto v2 is unmaintained; migrate.
Compatibility
- boto 2.49 is the last release; boto3 is current.
Why it happens
Old tutorials, books, and vendored scripts predate boto3 (2015). New environments never include boto, so the import fails.
Edge cases
- boto and boto3 coexist fine; migrating incrementally is safe.
- Some old boto code depends on Python 2 idioms; the migrate path forces cleanup.
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.