Showing results for 
Search instead for 
Did you mean: 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
Showing results for 
Search instead for 
Did you mean: 

Error importing pip package s3fs

Valued Contributor

A job recently began failing with the following error when a python notebook imports the pip package s3fs.

ImportError: cannot import name 'maybe_sync' from 'fsspec.asyn' (/databricks/python/lib/python3.8/site-packages/fsspec/
ImportError Traceback (most recent call last)
11 import time
12 from pathlib import Path
---> 13 import s3fs
15 pd.options.display.max_rows = 1000
/databricks/python/lib/python3.8/site-packages/s3fs/ in
----> 1 from .core import S3FileSystem, S3File
2 from .mapping import S3Map
4 from ._version import get_versions
/databricks/python/lib/python3.8/site-packages/s3fs/ in
9 from fsspec.spec import AbstractBufferedFile
10 from fsspec.utils import infer_storage_options, tokenize
---> 11 from fsspec.asyn import AsyncFileSystem, sync, sync_wrapper, maybe_sync
13 import aiobotocore


Valued Contributor

While checking the init script is installing the s3fs version 0.5.2.

This version has issues at the moment from the pypi. I have tested version 0.6.0 that works fine.

please change your requirement.txt file with a newer version of s3fs. Below is the path where the requirement.txt is residing


After changing the version to 0.6.0, we will no longer get the import error.

If you would like to try installing manually the pypi library below command will help you :

pip install s3fs==0.6.0

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!