Skip to content

pyschism dependency conflict with recent dask versions #13

@mansurjisan

Description

@mansurjisan

The conda version of pyschism is failing to import due to a dependency conflict. Specifically, the cf-python package (version 3.16.1) attempts to import collections_to_dsk from dask.base, but this function has been removed or renamed in recent dask versions (2025.4.1). I am currently investigating the issue.

Error Message

ImportError: cannot import name 'collections_to_dsk' from 'dask.base' (/home/mjisan/miniconda3/envs/pyschism_test/lib/python3.10/site-packages/dask/base.py)

Reproduction Steps

  1. Create a conda environment with pyschism
  2. Try to import the package
  3. Observe the import error related to dask dependency

Environment Information

  • pyschism version: 0.1.15
  • Python version: 3.10.13
  • dask-core version: 2025.4.1
  • cf-python version: 3.16.1
  • Operating system: Linux

Temporary Workaround

Downgrading dask-core to version 2023.3.0 resolves the issue:

conda install -c conda-forge dask-core=2023.3.0

Impact on UFS-Coastal Workflow

This issue might affect any UFS-Coastal workflows that rely on pyschism. Users upgrading their environments might encounter failing imports if their dask version is automatically updated to newer incompatible versions.

Additional Notes

The issue appears to be a compatibility problem between cf-python and recent dask versions. In the long term, cf-python should be updated to work with the newer dask API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions