Skip to content

WSL: importing Client from dask.distributed results in an ImportError with pip-installed dask #9027

@kjczarne

Description

@kjczarne

Describe the issue:

On Windows Subsystem for Linux it seems like the distributed module is not found with a complete installation.

Note

I did check whether I'm in the right environment.

Minimal Complete Verifiable Example:

# I first mistakenly installed the minimal package:
pip install dask
# Then I upgraded to complete:
pip install -U "dask[complete]"
# When things didn't work I've also uninstalled `dask`
# and installed again:
pip uninstall dask
pip install -U "dask[complete]"
# I also tried installing `distributed` explicitly:
pip install -U "dask[distributed]"
from dask.distributed import Client

We get:

Traceback (most recent call last):
  File "/home/kisoji/miniconda3/envs/dkm/lib/python3.10/site-packages/dask/distributed.py", line 13, in <module>
    from distributed import *
ModuleNotFoundError: No module named 'distributed'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/kisoji/miniconda3/envs/dkm/lib/python3.10/site-packages/dask/distributed.py", line 16, in <module>
    raise ImportError(_import_error_message) from e
ImportError: dask.distributed is not installed.

Please either conda or pip install distributed:

  conda install dask distributed             # either conda install
  python -m pip install "dask[distributed]" --upgrade    # or pip install

Anything else we need to know?:

Meanwhile, installing from Conda Forge seems to work:

conda install dask -c conda-forge

Environment:

  • Dask version: 2025.2.0
  • Python version: 3.10.13
  • Operating System: Windows Subsystem for Linux (Ubuntu 22.04.3 LTS)
  • Install method (conda, pip, source): pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions