Closed peterroelants closed 5 months ago
Dask recently added this as a dependency (yesterday). See here. You can either install the package or run the following command dask config set dataframe.query-planning false
.
I'm not currently sure what we will do in datashader.
This seems like an issue on the dask side tbh. If dask.dataframe
depends on dask_expr
it then it should depend on it.
Hey, since I just ran into the same issue...
It's true that conda install -c conda-forge dask
installs dask_expr
as well, but pip install dask
does not !
For pip
you have to explicitly specify pip install dask[dataframe]
(see here)
As I see it, this would mean that pip install datashader
is broken but conda install -c conda-forge datashader
is not.
Does this still happen with 2024.3.1? Because of https://github.com/dask/dask/pull/11003, this should now only give a warning and not an exception.
Still hitting this with dask=2024.4.1
. The ValueError
has become an ImportError
now after https://github.com/dask/dask/pull/11007:
>>> import datashader
/home/user/mambaforge/envs/dev/lib/python3.11/site-packages/dask/dataframe/__init__.py:31: FutureWarning:
Dask dataframe query planning is disabled because dask-expr is not installed.
You can install it with `pip install dask[dataframe]` or `conda install dask`.
This will raise in a future version.
warnings.warn(msg, FutureWarning)
Traceback (most recent call last):
File "/home/user/mambaforge/envs/dev/lib/python3.11/site-packages/dask/dataframe/__init__.py", line 97, in <module>
import dask_expr as dd
ModuleNotFoundError: No module named 'dask_expr'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/mambaforge/envs/dev/lib/python3.11/site-packages/datashader/__init__.py", line 9, in <module>
from .core import Canvas # noqa (API import)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/mambaforge/envs/dev/lib/python3.11/site-packages/datashader/core.py", line 9, in <module>
import dask.dataframe as dd
File "/home/user/mambaforge/envs/dev/lib/python3.11/site-packages/dask/dataframe/__init__.py", line 110, in <module>
raise ImportError(msg) from e
ImportError: Dask dataframe requirements are not installed.
Please either conda or pip install as follows:
conda install dask # either conda install
python -m pip install "dask[dataframe]" --upgrade # or python -m pip install
This will be fixed in the next dask release. See https://github.com/dask/dask/pull/11048.
Thanks for contacting us! Please read and follow these instructions carefully, then delete this introductory text to keep your issue easy to read. Note that the issue tracker is NOT the place for usage questions and technical assistance; post those at Discourse instead. Issues without the required information below may be closed immediately.
ALL software version info
Description of expected behavior and the observed behavior
import datashader
leads toValueError: Must install dask-expr to activate query planning.
Complete, minimal, self-contained example code that reproduces the issue