Skip to content

Commit

Permalink
Only warn if dask-expr is not installed (#11003)
Browse files Browse the repository at this point in the history
  • Loading branch information
fjetter authored Mar 15, 2024
1 parent 5949e54 commit 32a2446
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion dask/dataframe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,16 @@ def _dask_expr_enabled() -> bool:
try:
import dask_expr # noqa: F401
except ImportError:
raise ValueError("Must install dask-expr to activate query planning.")
msg = """
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.
"""
if use_dask_expr is None:
warnings.warn(msg, FutureWarning)
else:
raise ValueError(msg)
return True


Expand Down

0 comments on commit 32a2446

Please sign in to comment.