Stream: python-questions

Topic: dask-jobqueue import error


view this post on Zulip Matt Long (Jan 15 2021 at 16:59):

I just built a new environment and cannot import dask_jobqueue; it returns the following trace.

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-6-ce9ad91a0073> in <module>
      1 import distributed
----> 2 import dask_jobqueue
      3 from ncar_jobqueue import NCARCluster

/glade/work/mclong/miniconda3/envs/krill/lib/python3.7/site-packages/dask_jobqueue/__init__.py in <module>
      1 # flake8: noqa
      2 from . import config
----> 3 from .core import JobQueueCluster
      4 from .moab import MoabCluster
      5 from .pbs import PBSCluster

/glade/work/mclong/miniconda3/envs/krill/lib/python3.7/site-packages/dask_jobqueue/core.py in <module>
     13 from dask.utils import ignoring
     14
---> 15 from distributed.core import Status
     16 from distributed.deploy.spec import ProcessInterface, SpecCluster
     17 from distributed.deploy.local import nprocesses_nthreads

ImportError: cannot import name 'Status' from 'distributed.core' (/glade/work/mclong/miniconda3/envs/krill/lib/python3.7/site-packages/distributed/core.py)

I have dask pinned at v2.14.0.

Anybody have ideas about what is screwed up?

cc @xdev, @Anderson Banihirwe

view this post on Zulip Matt Long (Jan 15 2021 at 17:14):

Deprecating dask-jobqueue to v0.7.1 solved the problem.

view this post on Zulip Anderson Banihirwe (Jan 15 2021 at 21:07):

Anybody have ideas about what is screwed up?

Version mismatch :slight_smile:....

I'm presuming you were running dask-jobqueue v0.7.2 when you ran into this issue. The Status class was introduced in distributed v2.19. Do you know which version of distributed you had upon the environment creation?

view this post on Zulip Anderson Banihirwe (Jan 15 2021 at 21:12):

Anybody have ideas about what is screwed up?

Version mismatch :slight_smile:....

It appears the culprit is dask-jobqueue's conda-forge feedstock. It doesn't enforce the minimum version requirements (distributed v2.19). So, it is likely that you got incompatible versions in your environment. I'm going to submit a PR to address this

view this post on Zulip Matt Long (Jan 15 2021 at 21:18):

Thanks @Anderson Banihirwe. Yes, I was running with v0.7.2 and deprecating to v0.7.1 fixed it.

view this post on Zulip Anderson Banihirwe (Jan 18 2021 at 21:15):

@Matt Long, this issue has been addressed. dask-jobqueue v0.7.2 should work without a problem

view this post on Zulip Matt Long (Jun 26 2021 at 12:40):

@Anderson Banihirwe, this problem does not appear to be fixed. With Dask v2.14.0, I cannot import dask-jobqueue v0.7.2. v0.7.1 seems to work.

view this post on Zulip Anderson Banihirwe (Jun 28 2021 at 15:45):

Which version (including the build number) of dask-jobqueue are you running? The fix for version mismatch was addressed in dask-jobqueue-0.7.2-pyhd8ed1ab_1 conda package


Last updated: Jan 30 2022 at 12:01 UTC