dask: ImportError: No module named 'toolz' on default install
The documentation states
pip install dask: Install only dask, which depends only on the standard library. This is appropriate if you only want the task schedulers.
With dask==0.12.0 installed an import fails, because toolz is not required as a dependency.
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input> in <module>()
1 import pandas as pd
----> 2 import dask
lib/python3.5/site-packages/dask/__init__.py in <module>()
3 from .core import istask
4 from .context import set_options
----> 5 from .async import get_sync as get
6 try:
7 from .delayed import do, delayed, value
lib/python3.5/site-packages/dask/async.py in <module>()
118 import traceback
119
--> 120 from toolz import identity
121
122 from .compatibility import Queue
ImportError: No module named 'toolz'
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 6
- Comments: 19 (12 by maintainers)
Links to this issue
Commits related to this issue
- Remove toolz dependency in async.py - provide an 'identity' function right inside dask/async.py so that toolz isn't a hard requirement for a "default" pip installation - closes #1849 — committed to ernstki/dask by ernstki 7 years ago
- Remove toolz dependency in async.py (#1882) * Remove toolz dependency in async.py - provide an 'identity' function right inside dask/async.py so that toolz isn't a hard requirement for a "defau... — committed to dask/dask by ernstki 7 years ago
The error message also appears in this variant: “No module named ‘tlz’”.
Running
pip install dask[complete] [--user], among other options, corrects this.@mrocklin I’d be happy to do a PR.
It’s well-documented on dask.pydata.org, but would it also be okay if I added a small note to the
README, mirroring what’s in the “Install Dask” section of the documentation?I too was surprised when
pip install daskfollowed byimport dask.dataframe as dddidn’t just work (I get the error from this issue, plus cloudpickle is required).pip install dask[complete]
On Sun, Apr 28, 2019 at 1:01 PM StephenBoesch notifications@github.com wrote:
@darrenleeweber the extra
toolzdependency fordask.delayedcan be installed via:However, this is not clear from the current installation docs. I’ve opened up #4660 to help clarify.
Starting at the next release(
2021.03.1),pip install daskwill includetoolz.@ernstki the accepted answer is still accurate. In fact, the error message raised in Dask itself today looks very similar to the stackoverflow answer. For example, if (in a fresh environment) one does
pip install daskand then tries to importdask.dataframeyou’ll get: