Cannot use `smart_open.s3.iter_bucket` because of missing `boto` dependancy.
See original GitHub issueProblem description
It seems that 1.11
causes import problems with boto
. boto
does not seem to appear as a dependancy for the package anymore, while it is still imported in smart_open.s3
. That does not throw an error when installing but does when I try to use smart_open.s3.iter_bucket
.
Steps/code to reproduce the problem
I’ve made the following to be sure, on a brand new virtual environment
mkdir test_repo && cd test_repo
virtualenv venv
pip3 install smart-open
python3 test-import.py
With test-import.py
being :
from smart_open.s3 import iter_bucket
iter_bucket("some bucket")
Here is the result from python3 test-import.py
:
$ python3 test-import.py
unable to import 'smart_open.gcs', disabling that module
unable to import 'smart_open.s3', disabling that module
Traceback (most recent call last):
File "test-import.py", line 1, in <module>
from smart_open.s3 import iter_bucket
File "/Users/**/test-repo/venv/lib/python3.6/site-packages/smart_open/__init__.py", line 29, in <module>
from .s3 import iter_bucket as s3_iter_bucket
File "/Users/**/test-repo/venv/lib/python3.6/site-packages/smart_open/s3.py", line 15, in <module>
import boto
ModuleNotFoundError: No module named 'boto'
Versions
Please provide the output of:
import platform, sys, smart_open
print(platform.platform())
print("Python", sys.version)
print("smart_open", smart_open.__version__)
The above import of smart_open does not work either, but I’m using version 1.11.0
Darwin-18.7.0-x86_64-i386-64bit
Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 03:02:14)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
smart_open 1.11.0
Checklist
Before you create the issue, please make sure you have:
- Described the problem clearly
- Provided a minimal reproducible example, including any required data
- Provided the version numbers of the relevant software
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Reading a file from a private S3 bucket to a pandas dataframe
I have configured the AWS credentials using aws configure. I can download a file from a private bucket using boto3, which uses aws...
Read more >Resolve 403 errors when modifying an S3 bucket policy - AWS
I keep getting a "403 Access Denied" error when I try to modify the bucket policy of my Amazon Simple Storage Service (Amazon...
Read more >smart-open 1.3.3 - PyPI
smart_open is a Python 2 & Python 3 library for efficient streaming of very large files from/to S3, HDFS, WebHDFS or local (compressed)...
Read more >Working with Amazon S3 buckets with Boto3
The complete cheat sheet for working with Amazon Simple Storage Service (S3) buckets with Python and Boto3.
Read more >terraform-aws-modules/s3-bucket/aws
AWS S3 bucket Terraform module · static web-site hosting · access logging · versioning · CORS · lifecycle rules · server-side encryption ·...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I looked into the logs some more. One of the test dependencies had a dependency on boto, so it was getting installed that way.
Scary.