aws / aws-sdk-pandas

pandas on AWS - Easy integration with Athena, Glue, Redshift, Timestream, Neptune, OpenSearch, QuickSight, Chime, CloudWatchLogs, DynamoDB, EMR, SecretManager, PostgreSQL, MySQL, SQLServer and S3 (Parquet, CSV, JSON and EXCEL).
https://aws-sdk-pandas.readthedocs.io
Apache License 2.0
3.94k stars 701 forks source link

ModuleNotFoundError: No module named 'awswrangler.s3._describe'; 'awswrangler.s3' is not a package #1453

Closed nrcjea001 closed 2 years ago

nrcjea001 commented 2 years ago

Describe the bug

Unable to import awswrangler

How to Reproduce

  1. conda install -c conda-forge awswrangler=2.16.1
  2. import awswrangler as wr
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Input In [3], in <cell line: 1>()
----> 1 import awswrangler as wr

File /opt/conda/envs/ml10/lib/python3.10/site-packages/awswrangler/__init__.py:10, in <module>
      8 import awswrangler.data_types  # noqa
      9 import awswrangler.utils  # noqa
---> 10 from awswrangler.__version__ import __description__, __title__, __version__  # noqa
     11 from awswrangler.athena import Athena  # noqa
     12 from awswrangler.aurora import Aurora  # noqa

File /opt/conda/envs/ml10/lib/python3.10/site-packages/awswrangler/lakeformation/__init__.py:3, in <module>
      1 """Amazon Lake Formation Module."""
----> 3 from awswrangler.lakeformation._read import read_sql_query, read_sql_table  # noqa
      4 from awswrangler.lakeformation._utils import (  # noqa
      5     _build_table_objects,
      6     _get_table_objects,
   (...)
     13     wait_query,
     14 )
     16 __all__ = [
     17     "read_sql_query",
     18     "read_sql_table",
   (...)
     27     "wait_query",
     28 ]

File /opt/conda/envs/ml10/lib/python3.10/site-packages/awswrangler/lakeformation/_read.py:14, in <module>
     12 from awswrangler._config import apply_configs
     13 from awswrangler.catalog._utils import _catalog_id, _transaction_id
---> 14 from awswrangler.lakeformation._utils import commit_transaction, start_transaction, wait_query
     16 _logger: logging.Logger = logging.getLogger(__name__)
     19 def _get_work_unit_results(
     20     query_id: str,
     21     token_work_unit: Tuple[str, int],
     22     client_lakeformation: boto3.client,
     23 ) -> Table:

File /opt/conda/envs/ml10/lib/python3.10/site-packages/awswrangler/lakeformation/_utils.py:13, in <module>
     11 from awswrangler import _utils, exceptions
     12 from awswrangler.catalog._utils import _catalog_id, _transaction_id
---> 13 from awswrangler.s3._describe import describe_objects
     15 _QUERY_FINAL_STATES: List[str] = ["ERROR", "FINISHED"]
     16 _QUERY_WAIT_POLLING_DELAY: float = 2  # SECONDS

ModuleNotFoundError: No module named 'awswrangler.s3._describe'; 'awswrangler.s3' is not a package

Expected behavior

No response

Your project

No response

Screenshots

No response

OS

Amazon SageMaker Data Science Image

Python version

3.10.4

AWS DataWrangler version

2.16.1

Additional context

No response

nrcjea001 commented 2 years ago

Had an older version of awswrangler installed. Had to remove it and its dependencies before reinstalling latest version