question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: No module named 'toolz' on default install

See original GitHub issue

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'

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:19 (12 by maintainers)

github_iconTop GitHub Comments

8reactions
john-awscommented, Aug 3, 2020

The error message also appears in this variant: “No module named ‘tlz’”.

>>> import dask.array as da
Traceback (most recent call last):
  File "/home/me/.local/lib/python3.7/site-packages/dask/array/__init__.py", line 2, in <module>
    from .blockwise import blockwise, atop
  File "/home/me/.local/lib/python3.7/site-packages/dask/array/blockwise.py", line 4, in <module>
    import tlz as toolz
ModuleNotFoundError: No module named 'tlz'

Running pip install dask[complete] [--user], among other options, corrects this.

7reactions
ernstkicommented, Jan 3, 2017

@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?

##Installation

To install Dask with pip there are a few options, depending on which
dependencies you would like to keep up to date:

* pip install dask[complete]: Install everything
* pip install dask[array]: Install dask and numpy
* pip install dask[bag]: Install dask and cloudpickle
* pip install dask[dataframe]: Install dask, numpy, and pandas
* pip install dask: Install only dask, which depends only on the standard
  library. This is appropriate if you only want the task schedulers.

We do this so that users of the lightweight core dask scheduler aren’t required
to download the more exotic dependencies of the collections (numpy, pandas,
etc.).

For more information, see the [installation
documentation](http://dask.pydata.org/en/latest/install.html)

I too was surprised when pip install dask followed by import dask.dataframe as dd didn’t just work (I get the error from this issue, plus cloudpickle is required).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Default pip installation of Dask gives "ImportError: No module ...
At Dask 0.13.0 and below, there was a requirement on toolz' identity ... in <module> import pandas as pd ImportError: No module named...
Read more >
Python – Default pip installation of Dask gives “ImportError: No ...
Python – Default pip installation of Dask gives “ImportError: No module named toolz”. daskimporterrorinstallationpippython. I installed Dask using pip like ...
Read more >
pip installation of Dask gives "ImportError: No module named ...
Default pip installation of Dask gives "ImportError: No module named toolz". Answer a question I installed Dask using pip like this: pip ...
Read more >
Developers - ImportError: No module named 'toolz' on default install -
ImportError : No module named 'toolz' on default install.
Read more >
no module named 'distributed' - You.com | The AI Search ...
If you try to import a module that is n unsupported by the library, you will get ModuleNotFoundError: No module named. To ensure...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found