1

I am using the latest version of s3fs-0.5.2 and fsspec-0.9.0, when import s3fs, encountered the following error:

File "/User/.conda/envs/py376/lib/python3.7/site-packages/s3fs/__init__.py", line 1, in <module>
from .core import S3FileSystem, S3File
  File "/User/.conda/envs/py376/lib/python3.7/site-packages/s3fs/core.py", line 11, in <module>
    from fsspec.asyn import AsyncFileSystem, sync, sync_wrapper, maybe_sync
ImportError: cannot import name 'maybe_sync' from 'fsspec.asyn' (/User/.conda/envs/py376/lib/python3.7/site-packages/fsspec/asyn.py)

what is a working combination version of s3fs and fsspec?

Andrew Gaul
  • 2,296
  • 1
  • 12
  • 19
xsqian
  • 199
  • 5
  • 13

2 Answers2

-1

The latest version of s3fs and fsspec as of today is 2021.11.0. The latest version on conda-forge is 2021.10.1 . Since the change to calendar versioning this year, the two are always released together and the dependency pinned, so that this kind of problem won't occur in the future.

I believe for fsspec 0.9.0, you need s3fs 0.6.0 .

mdurant
  • 27,272
  • 5
  • 45
  • 74
-1

In my case the same happened. 'maybe_sync' was missing from 'fsspec.asyn'. For me, the following worked.

!pip install --upgrade awscli
!pip install --upgrade boto3
!pip install --upgrade git+https://github.com/dask/s3fs
betelgeuse
  • 1,136
  • 3
  • 13
  • 25
  • Please do not do this as a general setup. Upgrading all your packages in an environment like this can really break things (e.g., the botocore/aiobotocore pinning), and you should not rely on the main branch version unless you know what you are doing. – mdurant Feb 22 '22 at 13:43