【问题标题】:Does PyFilesystem's s3 filesystem support python 3?PyFilesystem 的 s3 文件系统是否支持 python 3?
【发布时间】:2019-07-23 18:13:44
【问题描述】:

PyFilesystem 的 s3fs(S3 文件系统)的文档说它只在 python 2 中受支持,因为 boto 只支持 python 2。

https://pyfilesystem.readthedocs.io/en/latest/s3fs.html

然而 Boto3 已发布且稳定:

https://github.com/boto/boto3

我只是想验证文档在这一点上是否仍然准确。我无法在我的 python 3 环境中导入 fs.s3fs

【问题讨论】:

    标签: python pyfilesystem


    【解决方案1】:

    S3 文件系统确实支持 boto3,有一个旧版本的文档潜伏在周围,可能会让您望而却步。此文件系统还需要单独的 pip 安装。

    在此处单独存储库中记录:

    https://github.com/PyFilesystem/s3fs

    pip install fs-s3fs
    

     

    from fs_s3fs import S3FS
    s3fs = S3FS('mybucket')
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-01-06
      • 1970-01-01
      • 1970-01-01
      • 2014-08-16
      • 2013-06-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多