0

我正在使用 AWS sagemaker Jupiter 笔记本并收到以下错误:

<ipython-input-42-14cd1ee49f9c> in <module>()
      1 import s3fs
----> 2 import fastparquet as fp
      3 s3 = s3fs.S3FileSystem()
      4 fs = s3fs.core.S3FileSystem()
      5 

~/anaconda3/envs/mxnet_p36/lib/python3.6/site-packages/fastparquet/__init__.py in <module>()
      6 
      7 from .thrift_structures import parquet_thrift
----> 8 from .core import read_thrift
      9 from .writer import write
     10 from . import core, schema, converted_types, api

~/anaconda3/envs/mxnet_p36/lib/python3.6/site-packages/fastparquet/core.py in <module>()
     12 
     13 from . import encoding
---> 14 from .compression import decompress_data
     15 from .converted_types import convert, typemap
     16 from .schema import _is_list_like, _is_map_like

~/anaconda3/envs/mxnet_p36/lib/python3.6/site-packages/fastparquet/compression.py in <module>()
     43     def snappy_decompress(data, uncompressed_size):
     44         return snappy.decompress(data)
---> 45     compressions['SNAPPY'] = snappy.compress
     46     decompressions['SNAPPY'] = snappy_decompress
     47 except ImportError:

AttributeError: module 'snappy' has no attribute 'compress'

我注意到该属性名为 snappy.compress。不应该是带有下划线的 snappy_compress 吗?

4

1 回答 1

0

感谢您使用 Amazon SageMaker。

这看起来不像 Amazon SageMaker 的问题。您可能会在导入 fastparquet帖子时使用 snappy 找到有关此错误的答案。

希望这可以帮助。

于 2018-07-30T22:59:54.483 回答