Open iimog opened 1 year ago
I have not tried to figure out the exact source of the problem but it could be something breaking from an incompatible dependency. Try installing this:
$ pip install starfish==0.2.2
$ pip install scikit-image==0.15.0
and then you should be able to run the blob detector as above.
Thank you for your response. I'm quite sure, that you are correct, and the error is due to incompatible dependencies. However, I still don't get a working environment with an installation like this. What I tried:
mamba create -n starfish-issue-test python=3.8
mamba activate starfish-issue-test
pip install starfish==0.2.2
pip install scikit-image==0.15.0
Running the example above now leads to the new error (truncated):
[...]
raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Installing an older version of numpy
(I tried multiple, the following message is with version 1.20.3) leads to
Traceback (most recent call last):
File "example.py", line 2, in <module>
from starfish.image import ApplyTransform, LearnTransform, Filter
File "/home/iimog/mambaforge/envs/starfish-issue-test/lib/python3.8/site-packages/starfish/__init__.py", line 1, in <module>
from . import (
File "/home/iimog/mambaforge/envs/starfish-issue-test/lib/python3.8/site-packages/starfish/image.py", line 1, in <module>
from starfish.core.image import ( # noqa: F401
File "/home/iimog/mambaforge/envs/starfish-issue-test/lib/python3.8/site-packages/starfish/core/image/__init__.py", line 1, in <module>
from ._registration import ApplyTransform
File "/home/iimog/mambaforge/envs/starfish-issue-test/lib/python3.8/site-packages/starfish/core/image/_registration/ApplyTransform/__init__.py", line 1, in <module>
from ._base import ApplyTransformAlgorithm
File "/home/iimog/mambaforge/envs/starfish-issue-test/lib/python3.8/site-packages/starfish/core/image/_registration/ApplyTransform/_base.py", line 4, in <module>
from starfish.core.imagestack.imagestack import ImageStack
File "/home/iimog/mambaforge/envs/starfish-issue-test/lib/python3.8/site-packages/starfish/core/imagestack/imagestack.py", line 31, in <module>
import skimage.io
File "/home/iimog/mambaforge/envs/starfish-issue-test/lib/python3.8/site-packages/skimage/__init__.py", line 135, in <module>
from .data import data_dir
File "/home/iimog/mambaforge/envs/starfish-issue-test/lib/python3.8/site-packages/skimage/data/__init__.py", line 13, in <module>
from ..io import imread, use_plugin
File "/home/iimog/mambaforge/envs/starfish-issue-test/lib/python3.8/site-packages/skimage/io/__init__.py", line 7, in <module>
from .manage_plugins import *
File "/home/iimog/mambaforge/envs/starfish-issue-test/lib/python3.8/site-packages/skimage/io/manage_plugins.py", line 24, in <module>
from .collection import imread_collection_wrapper
File "/home/iimog/mambaforge/envs/starfish-issue-test/lib/python3.8/site-packages/skimage/io/collection.py", line 12, in <module>
from ..external.tifffile import TiffFile
File "/home/iimog/mambaforge/envs/starfish-issue-test/lib/python3.8/site-packages/skimage/external/tifffile/__init__.py", line 1, in <module>
from .tifffile import imsave, imread, imshow, TiffFile, TiffWriter, \
File "/home/iimog/mambaforge/envs/starfish-issue-test/lib/python3.8/site-packages/skimage/external/tifffile/tifffile.py", line 298, in <module>
from . import _tifffile
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xe . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .
So far I have failed to collect a simple series of mamba
and pip
commands, that leads to a working starfish environment. I'd be happy to help, adding compatibility for more recent python and library versions. This is particularly important if napari
is required in the same environment, because it is only compatible with relatively recent versions.
Description
When trying to run the BlobDetector example, I receive a "ValueError: Data must be 1-dimensional"
Steps/Code to Reproduce
To reproduce, install the latest version of starfish from GitHub (
0.2.2-39-g853f56c7
) and try to run the BlobDetector example. Code from that example copied here:Expected Results
No error is thrown.
Actual Results
The following error occurs:
Versions
Linux-5.19.0-35-generic-x86_64-with-debian-bookworm-sid Python 3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 06:08:21) [GCC 9.4.0] NumPy 1.21.2 SciPy 1.7.1 scikit-image 0.18.3 pandas 1.3.2 sklearn 0.24.2 xarray 0.19.0 sympy 1.5.1 starfish 0.2.2+39.g853f56c7