cluster_tools icon indicating copy to clipboard operation
cluster_tools copied to clipboard

threadpool issue

Open martinschorb opened this issue 1 year ago • 11 comments

Hi,

I am trying to set up mboie_utils on Windows and Python 3.9 (fresh mamba installation, no other packages). I run into:

...\cluster_tools\watershed\watershed.py", line 140, in <module>
    @threadpool_limits.wrap(limits=1)  # restrict the numpy threadpool to 1 to avoid oversubscription
AttributeError: type object 'threadpool_limits' has no attribute 'wrap'

I remember having hit this before but could not find an issue for it.

martinschorb avatar Feb 12 '24 13:02 martinschorb

running a pip install -U threadpoolctl after the mobie_utils installation does the Job. Maybe the environment can be adapted accordingly.

martinschorb avatar Feb 12 '24 14:02 martinschorb

Thanks! I guess threadpoolctl is missing from some dependency list.

constantinpape avatar Feb 13 '24 15:02 constantinpape

I really had a lot of dependency trouble installing the mobie conda env using a miniforge base environment under Windows, When using the full-blown Anaconda and installing mamba in there and then creating the mobie env, there were no issues.

martinschorb avatar Feb 13 '24 15:02 martinschorb

The issue with threadpoolctl should be fixed here: https://github.com/conda-forge/python-elf-feedstock/pull/12

constantinpape avatar Feb 13 '24 15:02 constantinpape

For other dependency issues feel free to create a new issue.

constantinpape avatar Feb 13 '24 15:02 constantinpape

Just running into that again...

  • Brand new Anaconda or Miniforge
  • conda install mobie_utils -c conda-forge
  • python -c import mobie

Throws that error.

martinschorb avatar Feb 20 '24 11:02 martinschorb

import cluster_tools is sufficient to throw the error. import elf works.

versions shipped by conda-forge:

python-elf-0.5.0 cluster_tools-0.4.6 mobie_utils-0.4.5

Python is the conda default 3.11.5 Could that be causing problems?

martinschorb avatar Feb 20 '24 11:02 martinschorb

same issue with Python 3.10.13 in Miniforge

martinschorb avatar Feb 20 '24 11:02 martinschorb

works now in a fresh Anaconda with new environment Python 3.11.9 I am starting to hate this conda mess...

martinschorb avatar Feb 20 '24 11:02 martinschorb

This seems to depend on the version of threadpoolctl. I will set a lower version limit with the new release here.

constantinpape avatar Feb 20 '24 11:02 constantinpape

This should be fixed for environments that include mobie_utils with the new release. See https://github.com/conda-forge/mobie_utils-feedstock/pull/18/files.

constantinpape avatar Feb 20 '24 11:02 constantinpape