Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError on installation #82

Open
binyaminZ opened this issue Apr 4, 2023 · 3 comments
Open

ModuleNotFoundError on installation #82

binyaminZ opened this issue Apr 4, 2023 · 3 comments
Assignees

Comments

@binyaminZ
Copy link

Hi,
Trying to install FISH-quant from this link:
https://imjoy.io/#/app?w=fq-main&plugin=fish-quant/fq-imjoy:FISH-QUANT@stable&upgrade=1

I get the following error:

Logs
ModuleNotFoundError Traceback (most recent call last)Cell In[3], line 18
16 from skimage.exposure import rescale_intensity
17 import bigfish # Is there a way to get the version without import?
---> 18 from bigfish import stack, plot, detection, segmentation, multistack
20 # TEMPORARY BUG FIX
21 # 1. fix_1: flipped orientation of images in kaibu:
22 # * 'np.flipud': correct orientation of image in Kaibu.
23 # * Flip y coordinates
24
25 # For MAC
26 if sys.platform == "darwin":
File ~.conda\envs\fq-imjoy\lib\site-packages\bigfish\segmentation_init_.py:17
14 from .cell_segmentation import get_watershed_relief
15 from .cell_segmentation import apply_watershed
---> 17 from .nuc_segmentation import unet_3_classes_nuc
18 from .nuc_segmentation import apply_unet_3_classes
19 from .nuc_segmentation import from_3_classes_to_instances
File ~.conda\envs\fq-imjoy\lib\site-packages\bigfish\segmentation\nuc_segmentation.py:16
13 from .postprocess import label_instances
14 from .postprocess import clean_segmentation
---> 16 from skimage.morphology.selem import disk
17 from skimage.morphology import reconstruction
20 # ### Unet model ###
ModuleNotFoundError: No module named 'skimage.morphology.selem'

Versions:

  • OS: Windows 10
  • Python 3.10 installed with miniconda as described here
  • Browser: Chrome version 111.0.5563.147

Did I do anything wrong?
Thanks!

@StillJosh
Copy link

Hey,
I had the same error downloading it yesterday. What fixed it for me was downgrading skimage, as they apparently depreciated some parts of their morphology package.

If you are unfamiliar with the details of downgrading a package and just followed their guide (https://fq-imjoy.readthedocs.io/en/latest/imjoy-installation/), you probably set up a conda environment which you always activate via

conda activate fq-imjoy

After activation, you can just type in

pip install --upgrade scikit-image==0.19.2

and afterwards try the fishquant installation again.

Hope this fixes it for you as well!

@muellerflorian
Copy link
Member

Sorry for the late reply, and THANKS a lot Josh for the workaround.

As Josh pointed out, the latest upgrade in skimage is causing this problem. Fixing the version to 0.19.2 helps to avoid this issue.

We will look into this and provide a solution asap.

Florian

@muellerflorian muellerflorian transferred this issue from fish-quant/fq-imjoy Apr 27, 2023
@muellerflorian
Copy link
Member

Error is caused by this line in big-fish: https://github.com/fish-quant/big-fish/blob/master/bigfish/segmentation/nuc_segmentation.py#L16

For skimage <= 0.19, we have this

from skimage.morphology.selem import disk

Seems that with version >= 0.20, this should be

from skimage.morphology import disk

Solution 1: fix skimage version <= 0.19
Solution 2: fix skimage version > 0.20, change import statement

@Henley13 , any thoughts on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants