Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kjczarne opened this issue Mar 17, 2025 · 2 comments

Comments

@kjczarne
Copy link

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
@kjczarne kjczarne changed the title WSL: importing Client from dask.distributed results in an ImportError WSL: importing Client from dask.distributed results in an ImportError with pip-installed dask Mar 17, 2025
@kjczarne
Copy link
Author

Turns out sb on our shared machine symlinked pip to the base env

@jacobtomlinson
Copy link
Member

Glad you got it figured out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants