#12591·dask

__version__ resolves to "unknown" when installed via conda due to missing __commit_id__ in _version.py

Author: DeBoni03Created Sep 9, 2026Updated Sep 9, 2026
Labelsneeds triage

I'm not skilled enough to know what the real problem is, I just know I've spent the last hour trying to figure out what's wrong with my code; I'll leave here a report from Gemini:

When installing dask via conda on Windows (version 2025.11.0), the package falls back to __version__ = "unknown". This causes hard crashes in downstream libraries (like xarray and copernicusmarine) that rely on parsing the version via packaging.version.Version(dask.__version__), as they throw an InvalidVersion: Invalid version: 'unknown' exception.

Minimal Reproducible Example:

python
import dask
print(dask.__version__) # Returns "unknown"

Root cause: In dask/init.py, there is a backwards-compatibility try/except block for versioneer:

python
try:
    # Backwards compatibility with versioneer
    from dask._version import __commit_id__ as __git_revision__
    from dask._version import __version__
except ImportError:
    __git_revision__ = "unknown"
    __version__ = "unknown"

In the conda-packaged version, dask._version does contain version, but it does not contain commit_id. Because commit_id is missing, the ImportError triggers on the first line, jumping into the exception block and overriding the valid version by forcefully setting both variables to "unknown".

Environment: Operating System: Windows Installation method: Anaconda / conda Dask version: 2025.11.0