No module named "distributed"
NONE
The error ModuleNotFoundError: No module named 'datasets.distributed' means your installed datasets library is too old or incompatible with the version of Library you are using(in my case it was BEIR). The datasets.distributed module was removed in recent versions of the datasets library.

Downgrade datasets to version 2.14.6 : ! pip install datasets==2.14.6

2025-07-21T13:49:04Z
https://github.com/huggingface/datasets/issues/7688#issuecomment-3096866547
https://api.github.com/repos/huggingface/datasets/issues/7688
IC_kwDODunzps64lm7z
https://api.github.com/repos/huggingface/datasets/issues/comments/3096866547/reactions
2025-07-21T13:50:27Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3096866547
https://avatars.githubusercontent.com/u/169159018?v=4
https://api.github.com/users/baraayusry/events{/privacy}
https://api.github.com/users/baraayusry/followers
https://api.github.com/users/baraayusry/following{/other_user}
https://api.github.com/users/baraayusry/gists{/gist_id}
https://github.com/baraayusry
baraayusry
U_kgDOChUpag
https://api.github.com/users/baraayusry/orgs
https://api.github.com/users/baraayusry/received_events
https://api.github.com/users/baraayusry/repos
https://api.github.com/users/baraayusry/starred{/owner}{/repo}
https://api.github.com/users/baraayusry/subscriptions
User
https://api.github.com/users/baraayusry
public
MEMBER
this code does run in `datasets` 4.0:
```python
from datasets.distributed import split_dataset_by_node
```

make sure you have a python version that is recent enough (>=3.9) to be able to install `datasets` 4.0
2025-07-25T14:34:54Z
https://github.com/huggingface/datasets/issues/7688#issuecomment-3118131381
https://api.github.com/repos/huggingface/datasets/issues/7688
IC_kwDODunzps652ui1
https://api.github.com/repos/huggingface/datasets/issues/comments/3118131381/reactions
2025-07-25T14:34:54Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3118131381
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
NONE
I do think the problem is caused by the python version, because I do have python version 3.12.5
2025-07-25T15:14:19Z
https://github.com/huggingface/datasets/issues/7688#issuecomment-3118487703
https://api.github.com/repos/huggingface/datasets/issues/7688
IC_kwDODunzps654FiX
https://api.github.com/repos/huggingface/datasets/issues/comments/3118487703/reactions
2025-07-25T15:14:19Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3118487703
https://avatars.githubusercontent.com/u/169159018?v=4
https://api.github.com/users/baraayusry/events{/privacy}
https://api.github.com/users/baraayusry/followers
https://api.github.com/users/baraayusry/following{/other_user}
https://api.github.com/users/baraayusry/gists{/gist_id}
https://github.com/baraayusry
baraayusry
U_kgDOChUpag
https://api.github.com/users/baraayusry/orgs
https://api.github.com/users/baraayusry/received_events
https://api.github.com/users/baraayusry/repos
https://api.github.com/users/baraayusry/starred{/owner}{/repo}
https://api.github.com/users/baraayusry/subscriptions
User
https://api.github.com/users/baraayusry
public
### Describe the bug

hello, when I run the command "from datasets.distributed import split_dataset_by_node", I always met the bug "No module named 'datasets.distributed" in different version like 4.0.0, 2.21.0 and so on. How can I solve this?

### Steps to reproduce the bug

1. pip install datasets
2. from datasets.distributed import split_dataset_by_node

### Expected behavior

expecting the command "from datasets.distributed import split_dataset_by_node" can be ran successfully

### Environment info

python: 3.12