guiwitz / napari-sediment

https://guiwitz.github.io/napari-sediment/napari_sediment.html
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

plugin does not start #43

Closed aloboa closed 5 months ago

aloboa commented 5 months ago

Having installed on linux Debian-based 22-04

(base) alobo@pop-os:~$ conda activate sediment
(sediment) alobo@pop-os:~$ pip install git+https://github.com/guiwitz/napari-sediment.git
Collecting git+https://github.com/guiwitz/napari-sediment.git
  Cloning https://github.com/guiwitz/napari-sediment.git to /tmp/pip-req-build-duxzs1lw
  Running command git clone --filter=blob:none --quiet https://github.com/guiwitz/napari-sediment.git /tmp/pip-req-build-duxzs1lw
  Resolved https://github.com/guiwitz/napari-sediment.git to commit 5655932d2bb6a36064dbad0d0e488106ad5e1bc7
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: 
.../...

Successfully built napari-sediment
Installing collected packages: napari-sediment
  Attempting uninstall: napari-sediment
    Found existing installation: napari-sediment 0.1.dev235+g0d38f56
    Uninstalling napari-sediment-0.1.dev235+g0d38f56:
      Successfully uninstalled napari-sediment-0.1.dev235+g0d38f56
Successfully installed napari-sediment-0.1.dev309+g5655932

Once I run napari and select in Plugins/napari Sediment/Sediment The GUI is not displayed and this is what I get in the console:

$ napari
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
~/miniconda3/envs/sediment/lib/python3.9/site-packages/napari/_qt/menus/plugins_menu.py in _add_toggle_widget(key=('napari-sediment', 'Sediment'), hook_type='dock')
    103 
    104                 if hook_type == 'dock':
--> 105                     self._win.add_plugin_dock_widget(*key)
        global self._win.add_plugin_dock_widget = undefined
        key = ('napari-sediment', 'Sediment')
    106                 else:
    107                     self._win._add_plugin_function_widget(*key)

~/miniconda3/envs/sediment/lib/python3.9/site-packages/napari/_qt/qt_main_window.py in add_plugin_dock_widget(self=<napari._qt.qt_main_window.Window object>, plugin_name='napari-sediment', widget_name='Sediment', tabify=False)
    895             return dock_widget, wdg
    896 
--> 897         wdg = _instantiate_dock_widget(
        wdg = undefined
        global _instantiate_dock_widget = <function _instantiate_dock_widget at 0x7b32f5b83d30>
        Widget = <class 'napari_sediment.sediment_widget.SedimentWidget'>
        global cast = <function cast at 0x7b3328dc0f70>
        self._qt_viewer.viewer = Viewer(camera=Camera(center=(0.0, 0.0, 0.0), zoom=1.0, angles=(0.0, 0.0, 90.0), perspective=0.0, mouse_pan=True, mouse_zoom=True), cursor=Cursor(position=(1.0, 1.0), scaled=True, size=1, style=<CursorStyle.STANDARD: 'standard'>), dims=Dims(ndim=2, ndisplay=2, last_used=0, range=((0, 2, 1), (0, 2, 1)), current_step=(0, 0), order=(0, 1), axis_labels=('0', '1')), grid=GridCanvas(stride=1, shape=(-1, -1), enabled=False), layers=[], help='', status='Ready', tooltip=Tooltip(visible=False, text=''), theme='dark', title='napari', mouse_over_canvas=True, mouse_move_callbacks=[], mouse_drag_callbacks=[], mouse_double_click_callbacks=[], mouse_wheel_callbacks=[<function dims_scroll at 0x7b32f5e41550>], _persisted_mouse_event={}, _mouse_drag_gen={}, _mouse_wheel_gen={}, keymap={'A': <bound method ConvPaintWidget.hide_annotation of <napari_sediment.classifier.ConvPaintSpectralWidget object at 0x7b32cd5f8550>>, 'R': <bound method ConvPaintWidget.hide_prediction of <napari_sediment.classifier.ConvPaintSpectralWidget object at 0x7b32cd5f8550>>})
    898             Widget, cast('Viewer', self._qt_viewer.viewer)
    899         )

~/miniconda3/envs/sediment/lib/python3.9/site-packages/napari/_qt/qt_main_window.py in _instantiate_dock_widget(wdg_cls=<class 'napari_sediment.sediment_widget.SedimentWidget'>, viewer=Viewer(camera=Camera(center=(0.0, 0.0, 0.0), zoo...vPaintSpectralWidget object at 0x7b32cd5f8550>>}))
   1549 
   1550     # instantiate the widget
-> 1551     return wdg_cls(**kwargs)
        wdg_cls = <class 'napari_sediment.sediment_widget.SedimentWidget'>
        kwargs = {'napari_viewer': Viewer(camera=Camera(center=(0.0, 0.0, 0.0), zoom=1.0, angles=(0.0, 0.0, 90.0), perspective=0.0, mouse_pan=True, mouse_zoom=True), cursor=Cursor(position=(1.0, 1.0), scaled=True, size=1, style=<CursorStyle.STANDARD: 'standard'>), dims=Dims(ndim=2, ndisplay=2, last_used=0, range=((0, 2, 1), (0, 2, 1)), current_step=(0, 0), order=(0, 1), axis_labels=('0', '1')), grid=GridCanvas(stride=1, shape=(-1, -1), enabled=False), layers=[], help='', status='Ready', tooltip=Tooltip(visible=False, text=''), theme='dark', title='napari', mouse_over_canvas=True, mouse_move_callbacks=[], mouse_drag_callbacks=[], mouse_double_click_callbacks=[], mouse_wheel_callbacks=[<function dims_scroll at 0x7b32f5e41550>], _persisted_mouse_event={}, _mouse_drag_gen={}, _mouse_wheel_gen={}, keymap={'A': <bound method ConvPaintWidget.hide_annotation of <napari_sediment.classifier.ConvPaintSpectralWidget object at 0x7b32cd5f8550>>, 'R': <bound method ConvPaintWidget.hide_prediction of <napari_sediment.classifier.ConvPaintSpectralWidget object at 0x7b32cd5f8550>>})}

~/miniconda3/envs/sediment/lib/python3.9/site-packages/napari_sediment/sediment_widget.py in __init__(self=<napari_sediment.sediment_widget.SedimentWidget object>, napari_viewer=Viewer(camera=Camera(center=(0.0, 0.0, 0.0), zoo...vPaintSpectralWidget object at 0x7b32cd5f8550>>}))
     76         self._create_options_tab()
     77         self._create_processing_tab()
---> 78         self._create_mask_tab()
        self._create_mask_tab = <bound method SedimentWidget._create_mask_tab of <napari_sediment.sediment_widget.SedimentWidget object at 0x7b32bff62790>>
     79         self._create_roi_tab()
     80         self._create_export_tab()

~/miniconda3/envs/sediment/lib/python3.9/site-packages/napari_sediment/sediment_widget.py in _create_mask_tab(self=<napari_sediment.sediment_widget.SedimentWidget object>)
    358         # ml
    359         from .classifier import ConvPaintSpectralWidget
--> 360         self.mlwidget = ConvPaintSpectralWidget(self.viewer)
        self.mlwidget = undefined
        ConvPaintSpectralWidget = <class 'napari_sediment.classifier.ConvPaintSpectralWidget'>
        self.viewer = Viewer(camera=Camera(center=(0.0, 0.0, 0.0), zoom=1.0, angles=(0.0, 0.0, 90.0), perspective=0.0, mouse_pan=True, mouse_zoom=True), cursor=Cursor(position=(1.0, 1.0), scaled=True, size=1, style=<CursorStyle.STANDARD: 'standard'>), dims=Dims(ndim=2, ndisplay=2, last_used=0, range=((0, 2, 1), (0, 2, 1)), current_step=(0, 0), order=(0, 1), axis_labels=('0', '1')), grid=GridCanvas(stride=1, shape=(-1, -1), enabled=False), layers=[], help='', status='Ready', tooltip=Tooltip(visible=False, text=''), theme='dark', title='napari', mouse_over_canvas=True, mouse_move_callbacks=[], mouse_drag_callbacks=[], mouse_double_click_callbacks=[], mouse_wheel_callbacks=[<function dims_scroll at 0x7b32f5e41550>], _persisted_mouse_event={}, _mouse_drag_gen={}, _mouse_wheel_gen={}, keymap={'A': <bound method ConvPaintWidget.hide_annotation of <napari_sediment.classifier.ConvPaintSpectralWidget object at 0x7b32cd5f8550>>, 'R': <bound method ConvPaintWidget.hide_prediction of <napari_sediment.classifier.ConvPaintSpectralWidget object at 0x7b32cd5f8550>>})
    361         self.mask_group_ml.glayout.addWidget(self.mlwidget)
    362 

~/miniconda3/envs/sediment/lib/python3.9/site-packages/napari_sediment/classifier.py in __init__(self=<napari_sediment.classifier.ConvPaintSpectralWidget object>, viewer=Viewer(camera=Camera(center=(0.0, 0.0, 0.0), zoo...vPaintSpectralWidget object at 0x7b32cd5f8550>>}), parent=None, project=False, third_party=True)
     22         self.update_model_btn.clicked.connect(self.update_ml_mask)
     23         self.update_model_btn.setText( 'Train + Segment')
---> 24         self.check_tile_image.setChecked(True)
        self.check_tile_image.setChecked = undefined
     25 
     26 

AttributeError: 'ConvPaintSpectralWidget' object has no attribute 'check_tile_image'
guiwitz commented 5 months ago

The tiling option was only added recently in the separate plugin handling the ML annotation. Maybe you can try to do pip install napari-convpaint -U to update it and see if that works.

aloboa commented 5 months ago

Unfortunately not. After a succesful upgrading with

(sediment) alobo@pop-os:~$ pip install napari-convpaint -U
.../...
Downloading napari_convpaint-0.4.0-py3-none-any.whl (29 kB)
Installing collected packages: napari-convpaint
  Attempting uninstall: napari-convpaint
    Found existing installation: napari-convpaint 0.3.0
    Uninstalling napari-convpaint-0.3.0:
      Successfully uninstalled napari-convpaint-0.3.0
Successfully installed napari-convpaint-0.4.0

As soon as I select Plugins/napari Sediment/Sediment (or any other component), I get:

RuntimeError: Failed to import command at 'napari_sediment.sediment_widget:SedimentWidget': module 'numpy' has no attribute 'complex'.
`np.complex` was a deprecated alias for the builtin `complex`. To avoid this error in existing code, use `complex` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.complex128` 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

and a very long traceback output in the console:

AttributeError                            Traceback (most recent call last)
~/miniconda3/envs/sediment/lib/python3.9/site-packages/npe2/_command_registry.py in resolve(self=CommandHandler(id='napari-sediment.make_qwidget'...'napari_sediment.sediment_widget:SedimentWidget'))
     31         try:
---> 32             self.function = utils.import_python_name(self.python_name)
        self.function = None
        global utils.import_python_name = <function import_python_name at 0x73231c7d9a60>
        self.python_name = 'napari_sediment.sediment_widget:SedimentWidget'
     33         except Exception as e:

~/miniconda3/envs/sediment/lib/python3.9/site-packages/npe2/manifest/utils.py in import_python_name(python_name='napari_sediment.sediment_widget:SedimentWidget')
    253 
--> 254     mod = import_module(module_name)
        mod = undefined
        global import_module = <function import_module at 0x7323729df820>
        module_name = 'napari_sediment.sediment_widget'
    255     return getattr(mod, funcname)

~/miniconda3/envs/sediment/lib/python3.9/importlib/__init__.py in import_module(name='napari_sediment.sediment_widget', package=None)
    126             level += 1
--> 127     return _bootstrap._gcd_import(name[level:], package, level)
        global _bootstrap._gcd_import = <function _gcd_import at 0x732373c61310>
        name = 'napari_sediment.sediment_widget'
        level = 0
        package = None
    128 

~/miniconda3/envs/sediment/lib/python3.9/importlib/_bootstrap.py in _gcd_import(name='napari_sediment.sediment_widget', package=None, level=0)

~/miniconda3/envs/sediment/lib/python3.9/importlib/_bootstrap.py in _find_and_load(name='napari_sediment.sediment_widget', import_=<function _gcd_import>)

~/miniconda3/envs/sediment/lib/python3.9/importlib/_bootstrap.py in _find_and_load_unlocked(name='napari_sediment.sediment_widget', import_=<function _gcd_import>)

~/miniconda3/envs/sediment/lib/python3.9/importlib/_bootstrap.py in _call_with_frames_removed(f=<function _gcd_import>, *args=('napari_sediment',), **kwds={})

~/miniconda3/envs/sediment/lib/python3.9/importlib/_bootstrap.py in _gcd_import(name='napari_sediment', package=None, level=0)

~/miniconda3/envs/sediment/lib/python3.9/importlib/_bootstrap.py in _find_and_load(name='napari_sediment', import_=<function _gcd_import>)

~/miniconda3/envs/sediment/lib/python3.9/importlib/_bootstrap.py in _find_and_load_unlocked(name='napari_sediment', import_=<function _gcd_import>)

~/miniconda3/envs/sediment/lib/python3.9/importlib/_bootstrap.py in _load_unlocked(spec=ModuleSpec(name='napari_sediment', loader=<_froz...nt/lib/python3.9/site-packages/napari_sediment']))

~/miniconda3/envs/sediment/lib/python3.9/importlib/_bootstrap_external.py in exec_module(self=<_frozen_importlib_external.SourceFileLoader object>, module=<module 'napari_sediment' from '/home/alobo/mini...on3.9/site-packages/napari_sediment/__init__.py'>)

~/miniconda3/envs/sediment/lib/python3.9/importlib/_bootstrap.py in _call_with_frames_removed(f=<built-in function exec>, *args=(<code object <module> at 0x7322e2bd4190, file "/...te-packages/napari_sediment/__init__.py", line 2>, {'__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, ...}, '__cached__': '/home/alobo/miniconda3/envs/sediment/lib/python3...pari_sediment/__pycache__/__init__.cpython-39.pyc', '__doc__': None, '__file__': '/home/alobo/miniconda3/envs/sediment/lib/python3.9/site-packages/napari_sediment/__init__.py', '__loader__': <_frozen_importlib_external.SourceFileLoader object>, '__name__': 'napari_sediment', '__package__': 'napari_sediment', '__path__': ['/home/alobo/miniconda3/envs/sediment/lib/python3.9/site-packages/napari_sediment'], '__spec__': ModuleSpec(name='napari_sediment', loader=<_froz...nt/lib/python3.9/site-packages/napari_sediment']), '__version__': '0.1.dev309+g5655932', ...}), **kwds={})

~/miniconda3/envs/sediment/lib/python3.9/site-packages/napari_sediment/__init__.py in <module>
      7 from ._reader import napari_get_reader
----> 8 from .sediment_widget import SedimentWidget
        global sediment_widget = undefined
        global SedimentWidget = undefined
      9 

~/miniconda3/envs/sediment/lib/python3.9/site-packages/napari_sediment/sediment_widget.py in <module>
     41 from .images import save_rgb_tiff_image
---> 42 from .widgets.rgb_widget import RGBWidget
        global widgets.rgb_widget = undefined
        global RGBWidget = undefined
     43 from .utils import update_contrast_on_layer

~/miniconda3/envs/sediment/lib/python3.9/site-packages/napari_sediment/widgets/rgb_widget.py in <module>
      9 
---> 10 from ..utils import update_contrast_on_layer
        global utils = undefined
        global update_contrast_on_layer = undefined
     11 

~/miniconda3/envs/sediment/lib/python3.9/site-packages/napari_sediment/utils.py in <module>
      1 import numpy as np
----> 2 import colour
        global colour = undefined
      3 

~/.local/lib/python3.9/site-packages/colour/__init__.py in <module>
     66                       table_interpolation, lagrange_coefficients)
---> 67 from .colorimetry import (
        global colorimetry = undefined
        global BANDPASS_CORRECTION_METHODS = undefined
        global CCS_ILLUMINANTS = undefined
        global CCS_LIGHT_SOURCES = undefined
        global LIGHTNESS_METHODS = undefined
        global LUMINANCE_METHODS = undefined
        global MSDS_CMFS = undefined
        global MSDS_TO_XYZ_METHODS = undefined
        global MultiSpectralDistributions = undefined
        global SDS_ILLUMINANTS = undefined
        global SDS_LEFS = undefined
        global SDS_LIGHT_SOURCES = undefined
        global SD_GAUSSIAN_METHODS = undefined
        global SD_MULTI_LEDS_METHODS = undefined
        global SD_SINGLE_LED_METHODS = undefined
        global SD_TO_XYZ_METHODS = undefined
        global SPECTRAL_SHAPE_ASTME308 = undefined
        global SPECTRAL_SHAPE_DEFAULT = undefined
        global SpectralDistribution = undefined
        global SpectralShape = undefined
        global TVS_ILLUMINANTS_HUNTERLAB = undefined
        global WHITENESS_METHODS = undefined
        global YELLOWNESS_METHODS = undefined
        global bandpass_correction = undefined
        global colorimetric_purity = undefined
        global complementary_wavelength = undefined
        global dominant_wavelength = undefined
        global excitation_purity = undefined
        global lightness = undefined
        global luminance = undefined
        global luminous_efficacy = undefined
        global luminous_efficiency = undefined
        global luminous_flux = undefined
        global msds_constant = undefined
        global msds_ones = undefined
        global msds_zeros = undefined
        global msds_to_XYZ = undefined
        global sd_CIE_illuminant_D_series = undefined
        global sd_CIE_standard_illuminant_A = undefined
        global sd_blackbody = undefined
        global sd_constant = undefined
        global sd_gaussian = undefined
        global sd_mesopic_luminous_efficiency_function = undefined
        global sd_multi_leds = undefined
        global sd_ones = undefined
        global sd_single_led = undefined
        global sd_to_XYZ = undefined
        global sd_zeros = undefined
        global wavelength_to_XYZ = undefined
        global whiteness = undefined
        global yellowness = undefined
     68     BANDPASS_CORRECTION_METHODS, CCS_ILLUMINANTS, CCS_LIGHT_SOURCES,

~/.local/lib/python3.9/site-packages/colour/colorimetry/__init__.py in <module>
      9 
---> 10 from .spectrum import (SpectralShape, SPECTRAL_SHAPE_DEFAULT,
        global spectrum = undefined
        global SpectralShape = undefined
        global SPECTRAL_SHAPE_DEFAULT = undefined
        global SpectralDistribution = undefined
        global MultiSpectralDistributions = undefined
        global sds_and_msds_to_sds = undefined
        global sds_and_msds_to_msds = undefined
     11                        SpectralDistribution, MultiSpectralDistributions,

~/.local/lib/python3.9/site-packages/colour/colorimetry/spectrum.py in <module>
    486 
--> 487 SPECTRAL_SHAPE_DEFAULT = SpectralShape(360, 780, 1)
        global SPECTRAL_SHAPE_DEFAULT = undefined
        global SpectralShape = <class 'colour.colorimetry.spectrum.SpectralShape'>
    488 """

~/.local/lib/python3.9/site-packages/colour/colorimetry/spectrum.py in __init__(self=SpectralShape(None, None, None), start=360, end=780, interval=1)
     99         self._interval = None
--> 100         self.start = start
        self.start = None
        start = 360
    101         self.end = end

~/.local/lib/python3.9/site-packages/colour/colorimetry/spectrum.py in start(self=SpectralShape(None, None, None), value=360)
    128         if value is not None:
--> 129             assert is_numeric(value), (
        global is_numeric = <function is_numeric at 0x7322cb35c430>
        value.format = undefined
        value = 360
    130                 '"{0}" attribute: "{1}" is not a "numeric"!'.format(

~/.local/lib/python3.9/site-packages/colour/utilities/common.py in is_numeric(a=360)
    612             list(integer_types) +
--> 613             [float, complex, np.integer, np.floating, np.complex]))
        global float = undefined
        global complex = undefined
        global np.integer = <class 'numpy.integer'>
        global np.floating = <class 'numpy.floating'>
        global np.complex = undefined
    614 

~/miniconda3/envs/sediment/lib/python3.9/site-packages/numpy/__init__.py in __getattr__(attr='complex')
    323         if attr in __former_attrs__:
--> 324             raise AttributeError(__former_attrs__[attr])
        global AttributeError = undefined
        global __former_attrs__ = {'object': "module 'numpy' has no attribute 'object'.\n`np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. \nThe aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:\n    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations", 'bool': "module 'numpy' has no attribute 'bool'.\n`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.\nThe aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:\n    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations", 'float': "module 'numpy' has no attribute 'float'.\n`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.\nThe aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:\n    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations", 'complex': "module 'numpy' has no attribute 'complex'.\n`np.complex` was a deprecated alias for the builtin `complex`. To avoid this error in existing code, use `complex` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.complex128` here.\nThe aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:\n    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations", 'str': "module 'numpy' has no attribute 'str'.\n`np.str` was a deprecated alias for the builtin `str`. To avoid this error in existing code, use `str` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.str_` here.\nThe aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:\n    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations", 'int': "module 'numpy' has no attribute 'int'.\n`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.\nThe aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:\n    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations"}
        attr = 'complex'
    325 

AttributeError: module 'numpy' has no attribute 'complex'.
`np.complex` was a deprecated alias for the builtin `complex`. To avoid this error in existing code, use `complex` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.complex128` 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

The above exception was the direct cause of the following exception:

RuntimeError                              Traceback (most recent call last)
~/miniconda3/envs/sediment/lib/python3.9/site-packages/napari/_qt/menus/plugins_menu.py in _add_toggle_widget(key=('napari-sediment', 'Sediment'), hook_type='dock')
    103 
    104                 if hook_type == 'dock':
--> 105                     self._win.add_plugin_dock_widget(*key)
        global self._win.add_plugin_dock_widget = undefined
        key = ('napari-sediment', 'Sediment')
    106                 else:
    107                     self._win._add_plugin_function_widget(*key)

~/miniconda3/envs/sediment/lib/python3.9/site-packages/napari/_qt/qt_main_window.py in add_plugin_dock_widget(self=<napari._qt.qt_main_window.Window object>, plugin_name='napari-sediment', widget_name='Sediment', tabify=False)
    874         dock_kwargs = {}
    875 
--> 876         if result := _npe2.get_widget_contribution(plugin_name, widget_name):
        result = undefined
        _npe2.get_widget_contribution = <function get_widget_contribution at 0x7323152989d0>
        plugin_name = 'napari-sediment'
        widget_name = 'Sediment'
    877             Widget, widget_name = result
    878 

~/miniconda3/envs/sediment/lib/python3.9/site-packages/napari/plugins/_npe2.py in get_widget_contribution(plugin_name='napari-sediment', widget_name='Sediment')
    134         if contrib.plugin_name == plugin_name:
    135             if not widget_name or contrib.display_name == widget_name:
--> 136                 return contrib.get_callable(), contrib.display_name
        contrib.get_callable = <bound method WidgetContribution.get_callable of WidgetContribution(command='napari-sediment.make_qwidget', display_name='Sediment', autogenerate=False)>
        contrib.display_name = 'Sediment'
    137             widgets_seen.add(contrib.display_name)
    138     if widget_name and widgets_seen:

~/miniconda3/envs/sediment/lib/python3.9/site-packages/npe2/manifest/contributions/_widgets.py in get_callable(self=WidgetContribution(command='napari-sediment.make...et', display_name='Sediment', autogenerate=False), _registry=None)
     47         self, _registry: Optional[CommandRegistry] = None
     48     ) -> Callable[..., Widget]:
---> 49         func = super().get_callable()
        func = undefined
        global super.get_callable = undefined
     50         if self.autogenerate:
     51             try:

~/miniconda3/envs/sediment/lib/python3.9/site-packages/npe2/manifest/utils.py in get_callable(self=WidgetContribution(command='napari-sediment.make...et', display_name='Sediment', autogenerate=False), _registry=<npe2._command_registry.CommandRegistry object>)
     69 
     70             _registry = PluginManager.instance().commands
---> 71         return _registry.get(self.command)
        _registry.get = <bound method CommandRegistry.get of <npe2._command_registry.CommandRegistry object at 0x732315fc97c0>>
        self.command = 'napari-sediment.make_qwidget'
     72 
     73     @property

~/miniconda3/envs/sediment/lib/python3.9/site-packages/npe2/_command_registry.py in get(self=<npe2._command_registry.CommandRegistry object>, id='napari-sediment.make_qwidget')
    136             if id not in self._commands:  # sourcery skip
    137                 raise KeyError(f"command {id!r} not registered")
--> 138         return self._commands[id].resolve()
        self._commands = {'napari-sediment.get_reader': CommandHandler(id='napari-sediment.get_reader', function=None, python_name='napari_sediment._reader:napari_get_reader'), 'napari-sediment.make_qwidget': CommandHandler(id='napari-sediment.make_qwidget', function=None, python_name='napari_sediment.sediment_widget:SedimentWidget'), 'napari-sediment.make_hyperwidget': CommandHandler(id='napari-sediment.make_hyperwidget', function=None, python_name='napari_sediment.hyperanalysis_widget:HyperAnalysisWidget'), 'napari-sediment.make_spectralindexwidget': CommandHandler(id='napari-sediment.make_spectralindexwidget', function=None, python_name='napari_sediment.spectral_indices_widget:SpectralIndexWidget'), 'napari-sediment.make_batchwidget': CommandHandler(id='napari-sediment.make_batchwidget', function=None, python_name='napari_sediment.batch_indices:BatchIndexWidget'), 'napari-sediment.make_preproc_batchwidget': CommandHandler(id='napari-sediment.make_preproc_batchwidget', function=None, python_name='napari_sediment.batch_preproc:BatchPreprocWidget'), 'napari-sediment.make_convertwidget': CommandHandler(id='napari-sediment.make_convertwidget', function=None, python_name='napari_sediment.convert_widget:ConvertWidget')}
        id.resolve = undefined
    139 
    140     def execute(self, id: str, args=(), kwargs=None) -> Any:

~/miniconda3/envs/sediment/lib/python3.9/site-packages/npe2/_command_registry.py in resolve(self=CommandHandler(id='napari-sediment.make_qwidget'...'napari_sediment.sediment_widget:SedimentWidget'))
     32             self.function = utils.import_python_name(self.python_name)
     33         except Exception as e:
---> 34             raise RuntimeError(
        global RuntimeError = undefined
        e = undefined
     35                 f"Failed to import command at {self.python_name!r}: {e}"
     36             ) from e

RuntimeError: Failed to import command at 'napari_sediment.sediment_widget:SedimentWidget': module 'numpy' has no attribute 'complex'.
`np.complex` was a deprecated alias for the builtin `complex`. To avoid this error in existing code, use `complex` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.complex128` 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
(sediment) alobo@pop-os:~$ 
guiwitz commented 5 months ago

Can you post the output of conda list for that environment? I think you have a very outdated version of the the color-science package which produces this message and I don't know why.

aloboa commented 5 months ago

I had not realized that Convpaint was outside napari Sediment in the plugin list. Convpaint starts up with no problems. I can display an RGB image.

Can you post the output of conda list for that environment?

I do not see color-science listed. My napari-sediment version is 0.1.dev309+g5655932

(sediment) alobo@pop-os:~$ conda list
# packages in environment at /home/alobo/miniconda3/envs/sediment:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
alabaster                 0.7.16             pyhd8ed1ab_0    conda-forge
alsa-lib                  1.2.10               hd590300_0    conda-forge
aom                       3.8.1                h59595ed_0    conda-forge
app-model                 0.2.4              pyhd8ed1ab_0    conda-forge
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
asciitree                 0.3.3                      py_2    conda-forge
asttokens                 2.4.1              pyhd8ed1ab_0    conda-forge
attr                      2.5.1                h166bdaf_1    conda-forge
attrs                     23.2.0             pyh71513ae_0    conda-forge
autopep8                  2.1.1                    pypi_0    pypi
babel                     2.14.0             pyhd8ed1ab_0    conda-forge
beautifulsoup4            4.12.3                   pypi_0    pypi
blosc                     1.21.5               h0f2a231_0    conda-forge
brotli                    1.1.0                hd590300_1    conda-forge
brotli-bin                1.1.0                hd590300_1    conda-forge
brotli-python             1.1.0            py39h3d6467e_1    conda-forge
brunsli                   0.1                  h9c3ff4c_0    conda-forge
bzip2                     1.0.8                hd590300_5    conda-forge
c-blosc2                  2.13.2               hb4ffafa_0    conda-forge
ca-certificates           2024.2.2             hbcca054_0    conda-forge
cachey                    0.2.1              pyh9f0ad1d_0    conda-forge
cairo                     1.18.0               h3faef2a_0    conda-forge
certifi                   2024.2.2           pyhd8ed1ab_0    conda-forge
charls                    2.4.2                h59595ed_0    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
click                     8.1.7           unix_pyh707e725_0    conda-forge
cloudpickle               3.0.0              pyhd8ed1ab_0    conda-forge
cmap                      0.1.3                    pypi_0    pypi
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
comm                      0.2.1              pyhd8ed1ab_0    conda-forge
cycler                    0.12.1                   pypi_0    pypi
cytoolz                   0.12.3           py39hd1e30aa_0    conda-forge
dask-core                 2024.2.0           pyhd8ed1ab_0    conda-forge
dav1d                     1.2.1                hd590300_0    conda-forge
dbus                      1.13.6               h5008d03_3    conda-forge
debugpy                   1.8.1            py39h3d6467e_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
deprecated                1.2.14                   pypi_0    pypi
distributed               2024.2.0                 pypi_0    pypi
docstring_parser          0.15               pyhd8ed1ab_0    conda-forge
docutils                  0.17.1           py39hf3d152e_4    conda-forge
einops                    0.7.0                    pypi_0    pypi
exceptiongroup            1.2.0              pyhd8ed1ab_2    conda-forge
executing                 2.0.1              pyhd8ed1ab_0    conda-forge
expat                     2.5.0                hcb278e6_1    conda-forge
fasteners                 0.17.3             pyhd8ed1ab_0    conda-forge
filelock                  3.13.1                   pypi_0    pypi
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 h77eed37_1    conda-forge
fontconfig                2.14.2               h14ed4e7_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
freetype                  2.12.1               h267a509_2    conda-forge
freetype-py               2.4.0              pyhd8ed1ab_0    conda-forge
fsspec                    2024.2.0           pyhca7485f_0    conda-forge
gettext                   0.21.1               h27087fc_0    conda-forge
giflib                    5.2.1                h0b41bf4_3    conda-forge
glib                      2.78.3               hfc55251_0    conda-forge
glib-tools                2.78.3               hfc55251_0    conda-forge
graphite2                 1.3.13            h58526e2_1001    conda-forge
gst-plugins-base          1.22.9               h8e1006c_0    conda-forge
gstreamer                 1.22.9               h98fc4e7_0    conda-forge
h5py                      3.10.0                   pypi_0    pypi
harfbuzz                  8.3.0                h3d44ed6_0    conda-forge
heapdict                  1.0.1                      py_0    conda-forge
hsluv                     5.0.4              pyhd8ed1ab_0    conda-forge
icu                       73.2                 h59595ed_0    conda-forge
idna                      3.6                pyhd8ed1ab_0    conda-forge
imagecodecs               2024.1.1         py39hf9b8f0e_0    conda-forge
imageio                   2.34.0             pyh4b66e23_0    conda-forge
imageio-ffmpeg            0.4.9                    pypi_0    pypi
imagesize                 1.4.1              pyhd8ed1ab_0    conda-forge
importlib-metadata        7.0.1              pyha770c72_0    conda-forge
importlib_metadata        7.0.1                hd8ed1ab_0    conda-forge
importlib_resources       6.1.1              pyhd8ed1ab_0    conda-forge
in-n-out                  0.1.9              pyhd8ed1ab_0    conda-forge
ipykernel                 6.29.2             pyhd33586a_0    conda-forge
ipython                   8.18.1             pyh707e725_3    conda-forge
ipython-genutils          0.2.0                    pypi_0    pypi
jedi                      0.19.1             pyhd8ed1ab_0    conda-forge
jinja2                    3.1.3              pyhd8ed1ab_0    conda-forge
jsonschema                4.21.1             pyhd8ed1ab_0    conda-forge
jsonschema-specifications 2023.12.1          pyhd8ed1ab_0    conda-forge
jupyter_client            8.6.0              pyhd8ed1ab_0    conda-forge
jupyter_core              5.7.1            py39hf3d152e_0    conda-forge
jupytext                  1.16.2                   pypi_0    pypi
jxrlib                    1.1                  hd590300_3    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
kiwisolver                1.4.5            py39h7633fee_1    conda-forge
krb5                      1.21.2               h659d440_0    conda-forge
lame                      3.100             h166bdaf_1003    conda-forge
lazy_loader               0.3                pyhd8ed1ab_0    conda-forge
lcms2                     2.16                 hb7c19ff_0    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
lerc                      4.0.0                h27087fc_0    conda-forge
libaec                    1.1.2                h59595ed_1    conda-forge
libavif16                 1.0.4                h1dcd450_0    conda-forge
libblas                   3.9.0           21_linux64_openblas    conda-forge
libbrotlicommon           1.1.0                hd590300_1    conda-forge
libbrotlidec              1.1.0                hd590300_1    conda-forge
libbrotlienc              1.1.0                hd590300_1    conda-forge
libcap                    2.69                 h0f662aa_0    conda-forge
libcblas                  3.9.0           21_linux64_openblas    conda-forge
libclang                  15.0.7          default_hb11cfb5_4    conda-forge
libclang13                15.0.7          default_ha2b6cf4_4    conda-forge
libcups                   2.3.3                h4637d8d_4    conda-forge
libdeflate                1.19                 hd590300_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libevent                  2.1.12               hf998b51_1    conda-forge
libexpat                  2.5.0                hcb278e6_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libflac                   1.4.3                h59595ed_0    conda-forge
libgcc-ng                 13.2.0               h807b86a_5    conda-forge
libgcrypt                 1.10.3               hd590300_0    conda-forge
libgfortran-ng            13.2.0               h69a702a_5    conda-forge
libgfortran5              13.2.0               ha4646dd_5    conda-forge
libglib                   2.78.3               h783c2da_0    conda-forge
libgomp                   13.2.0               h807b86a_5    conda-forge
libgpg-error              1.47                 h71f35ed_0    conda-forge
libiconv                  1.17                 hd590300_2    conda-forge
libjpeg-turbo             3.0.0                hd590300_1    conda-forge
liblapack                 3.9.0           21_linux64_openblas    conda-forge
libllvm15                 15.0.7               hb3ce162_4    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libogg                    1.3.4                h7f98852_1    conda-forge
libopenblas               0.3.26          pthreads_h413a1c8_0    conda-forge
libopus                   1.3.1                h7f98852_1    conda-forge
libpng                    1.6.42               h2797004_0    conda-forge
libpq                     16.2                 h33b98f1_0    conda-forge
libsndfile                1.2.2                hc60ed4a_1    conda-forge
libsodium                 1.0.18               h36c2ea0_1    conda-forge
libsqlite                 3.45.1               h2797004_0    conda-forge
libstdcxx-ng              13.2.0               h7e041cc_5    conda-forge
libsystemd0               255                  h3516f8a_0    conda-forge
libtiff                   4.6.0                ha9c0a0a_2    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libvorbis                 1.3.7                h9c3ff4c_0    conda-forge
libwebp-base              1.3.2                hd590300_0    conda-forge
libxcb                    1.15                 h0b41bf4_0    conda-forge
libxcrypt                 4.4.36               hd590300_1    conda-forge
libxkbcommon              1.6.0                hd429924_1    conda-forge
libxml2                   2.12.5               h232c23b_0    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
libzopfli                 1.0.3                h9c3ff4c_0    conda-forge
locket                    1.0.0              pyhd8ed1ab_0    conda-forge
loguru                    0.7.2                    pypi_0    pypi
lz4-c                     1.9.4                hcb278e6_0    conda-forge
magicgui                  0.8.1              pyhd8ed1ab_0    conda-forge
markdown-it-py            3.0.0              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.5            py39hd1e30aa_0    conda-forge
matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
matplotlib-scalebar       0.8.1                    pypi_0    pypi
mdit-py-plugins           0.4.1                    pypi_0    pypi
mdurl                     0.1.2              pyhd8ed1ab_0    conda-forge
microfilm                 0.2.1                    pypi_0    pypi
mpg123                    1.32.4               h59595ed_0    conda-forge
msgpack-python            1.0.7            py39h7633fee_0    conda-forge
mypy_extensions           1.0.0              pyha770c72_0    conda-forge
mysql-common              8.0.33               hf1915f5_6    conda-forge
mysql-libs                8.0.33               hca2cd23_6    conda-forge
napari                    0.4.19             pyh9208f05_0    conda-forge
napari-animation          0.0.8                    pypi_0    pypi
napari-annotation-project 0.1.1                    pypi_0    pypi
napari-assistant          0.4.7                    pypi_0    pypi
napari-console            0.0.9              pyh9208f05_0    conda-forge
napari-convpaint          0.4.0                    pypi_0    pypi
napari-guitils            0.1.0                    pypi_0    pypi
napari-matplotlib         0.2.1                    pypi_0    pypi
napari-nifti              0.0.12                   pypi_0    pypi
napari-plugin-engine      0.2.0              pyhd8ed1ab_2    conda-forge
napari-sediment           0.1.dev309+g5655932          pypi_0    pypi
napari-skimage-regionprops 0.10.1                   pypi_0    pypi
napari-svg                0.1.10             pyhd8ed1ab_0    conda-forge
napari-time-series-plotter 0.0.6                    pypi_0    pypi
napari-time-slicer        0.5.0                    pypi_0    pypi
napari-tools-menu         0.1.19                   pypi_0    pypi
napari-workflows          0.2.10                   pypi_0    pypi
ncurses                   6.4                  h59595ed_2    conda-forge
nest-asyncio              1.6.0              pyhd8ed1ab_0    conda-forge
netcdf4                   1.6.5                    pypi_0    pypi
networkx                  3.2.1              pyhd8ed1ab_0    conda-forge
npe2                      0.7.4              pyhd8ed1ab_0    conda-forge
nspr                      4.35                 h27087fc_0    conda-forge
nss                       3.98                 h1d7d5a4_0    conda-forge
numcodecs                 0.12.1           py39h3d6467e_0    conda-forge
numpy                     1.26.4           py39h474f0d3_0    conda-forge
numpydoc                  1.5.0              pyhd8ed1ab_0    conda-forge
nvidia-cublas-cu12        12.1.3.1                 pypi_0    pypi
nvidia-cuda-cupti-cu12    12.1.105                 pypi_0    pypi
nvidia-cuda-nvrtc-cu12    12.1.105                 pypi_0    pypi
nvidia-cuda-runtime-cu12  12.1.105                 pypi_0    pypi
nvidia-cudnn-cu12         8.9.2.26                 pypi_0    pypi
nvidia-cufft-cu12         11.0.2.54                pypi_0    pypi
nvidia-curand-cu12        10.3.2.106               pypi_0    pypi
nvidia-cusolver-cu12      11.4.5.107               pypi_0    pypi
nvidia-cusparse-cu12      12.1.0.106               pypi_0    pypi
nvidia-nccl-cu12          2.19.3                   pypi_0    pypi
nvidia-nvjitlink-cu12     12.3.101                 pypi_0    pypi
nvidia-nvtx-cu12          12.1.105                 pypi_0    pypi
openjpeg                  2.5.0                h488ebb8_3    conda-forge
openssl                   3.2.1                hd590300_0    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
pandas                    2.2.0            py39hddac248_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
partd                     1.4.1              pyhd8ed1ab_0    conda-forge
pcre2                     10.42                hcad00b1_0    conda-forge
pexpect                   4.9.0              pyhd8ed1ab_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    10.2.0           py39had0adad_0    conda-forge
pint                      0.23               pyhd8ed1ab_0    conda-forge
pip                       24.0               pyhd8ed1ab_0    conda-forge
pixman                    0.43.2               h59595ed_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_1    conda-forge
platformdirs              4.2.0              pyhd8ed1ab_0    conda-forge
ply                       3.11                       py_1    conda-forge
pooch                     1.8.0              pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.42             pyha770c72_0    conda-forge
psutil                    5.9.8            py39hd1e30aa_0    conda-forge
psygnal                   0.9.5              pyhd8ed1ab_0    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pulseaudio-client         16.1                 hb77b528_5    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pyclesperanto-prototype   0.24.4                   pypi_0    pypi
pycodestyle               2.11.1                   pypi_0    pypi
pyconify                  0.1.6              pyhd8ed1ab_0    conda-forge
pydantic                  1.10.13          py39hd1e30aa_1    conda-forge
pydantic-compat           0.1.1              pyhd8ed1ab_0    conda-forge
pygments                  2.17.2             pyhd8ed1ab_0    conda-forge
pyopencl                  2024.2.2                 pypi_0    pypi
pyopengl                  3.1.6              pyhd8ed1ab_1    conda-forge
pyparsing                 3.1.1                    pypi_0    pypi
pyperclip                 1.8.2                    pypi_0    pypi
pyproject_hooks           1.0.0              pyhd8ed1ab_0    conda-forge
pyqt                      5.15.9           py39h52134e7_5    conda-forge
pyqt5-sip                 12.12.2          py39h3d6467e_5    conda-forge
pyrsistent                0.20.0                   pypi_0    pypi
pyshp                     2.3.1                    pypi_0    pypi
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.9.18          h0755675_1_cpython    conda-forge
python-build              1.0.3              pyhd8ed1ab_0    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-tzdata             2024.1             pyhd8ed1ab_0    conda-forge
python_abi                3.9                      4_cp39    conda-forge
pytools                   2024.1.3                 pypi_0    pypi
pytz                      2024.1             pyhd8ed1ab_0    conda-forge
pywavelets                1.4.1            py39h44dd56e_1    conda-forge
pyyaml                    6.0.1            py39hd1e30aa_1    conda-forge
pyzmq                     25.1.2           py39h8c080ef_0    conda-forge
qt-main                   5.15.8              h5810be5_19    conda-forge
qtconsole-base            5.5.1              pyha770c72_0    conda-forge
qtpy                      2.4.1              pyhd8ed1ab_0    conda-forge
rav1e                     0.6.6                he8a937b_2    conda-forge
readline                  8.2                  h8228510_1    conda-forge
referencing               0.33.0             pyhd8ed1ab_0    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
rich                      13.7.0             pyhd8ed1ab_0    conda-forge
rpds-py                   0.18.0           py39h9fdd4d6_0    conda-forge
scikit-image              0.22.0           py39hddac248_2    conda-forge
scikit-learn              1.4.1.post1              pypi_0    pypi
scipy                     1.12.0           py39h474f0d3_2    conda-forge
setuptools                69.0.3             pyhd8ed1ab_0    conda-forge
shellingham               1.5.4              pyhd8ed1ab_0    conda-forge
simpleitk                 2.3.1                    pypi_0    pypi
sip                       6.7.12           py39h3d6467e_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.10               h9fff704_0    conda-forge
snowballstemmer           2.2.0              pyhd8ed1ab_0    conda-forge
sortedcontainers          2.4.0                    pypi_0    pypi
soupsieve                 2.5                      pypi_0    pypi
spectral                  0.23.1                   pypi_0    pypi
sphinx                    4.5.0              pyh6c4a22f_0    conda-forge
sphinxcontrib-applehelp   1.0.4              pyhd8ed1ab_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    2.0.1              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1              pyhd8ed1ab_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_2    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
superqt                   0.6.1              pyh9208f05_0    conda-forge
svt-av1                   1.8.0                h59595ed_0    conda-forge
tblib                     3.0.0                    pypi_0    pypi
tifffile                  2024.2.12          pyhd8ed1ab_0    conda-forge
tk                        8.6.13          noxft_h4845f30_101    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tomli-w                   1.0.0              pyhd8ed1ab_0    conda-forge
toolz                     0.12.1             pyhd8ed1ab_0    conda-forge
torch                     2.2.0                    pypi_0    pypi
torchvision               0.17.0                   pypi_0    pypi
tornado                   6.3.3            py39hd1e30aa_1    conda-forge
tqdm                      4.66.2             pyhd8ed1ab_0    conda-forge
traitlets                 5.14.1             pyhd8ed1ab_0    conda-forge
transforms3d              0.4.1                    pypi_0    pypi
triton                    2.2.0                    pypi_0    pypi
typer                     0.9.0              pyhd8ed1ab_0    conda-forge
typing-extensions         4.9.0                hd8ed1ab_0    conda-forge
typing_extensions         4.9.0              pyha770c72_0    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
urllib3                   2.2.0              pyhd8ed1ab_0    conda-forge
vispy                     0.14.1           py39h51dfa90_0    conda-forge
wcwidth                   0.2.13             pyhd8ed1ab_0    conda-forge
webencodings              0.5.1                    pypi_0    pypi
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
wrapt                     1.16.0           py39hd1e30aa_0    conda-forge
xcb-util                  0.4.0                hd590300_1    conda-forge
xcb-util-image            0.4.0                h8ee46fc_1    conda-forge
xcb-util-keysyms          0.4.0                h8ee46fc_1    conda-forge
xcb-util-renderutil       0.3.9                hd590300_1    conda-forge
xcb-util-wm               0.4.1                h8ee46fc_1    conda-forge
xkeyboard-config          2.41                 hd590300_0    conda-forge
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libice               1.1.1                hd590300_0    conda-forge
xorg-libsm                1.2.4                h7391055_0    conda-forge
xorg-libx11               1.8.7                h8ee46fc_0    conda-forge
xorg-libxau               1.0.11               hd590300_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h0b41bf4_2    conda-forge
xorg-libxrender           0.9.11               hd590300_0    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-xextproto            7.3.0             h0b41bf4_1003    conda-forge
xorg-xf86vidmodeproto     2.3.1             h7f98852_1002    conda-forge
xorg-xproto               7.0.31            h7f98852_1007    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
yaml                      0.2.5                h7f98852_2    conda-forge
zarr                      2.17.0             pyhd8ed1ab_0    conda-forge
zeromq                    4.3.5                h59595ed_0    conda-forge
zfp                       1.0.1                h59595ed_0    conda-forge
zict                      3.0.0                    pypi_0    pypi
zipp                      3.17.0             pyhd8ed1ab_0    conda-forge
zlib                      1.2.13               hd590300_5    conda-forge
zlib-ng                   2.0.7                h0b41bf4_0    conda-forge
zstd                      1.5.5                hfc55251_0    conda-forge
guiwitz commented 5 months ago

It looks like your installation looks for missing packages outside the environment (in ~/.local/lib) and finds the outdated color package there. This is a very strange configuration as the whole point of environments is to not use anything outside them. In any case that should be solved by updating the plugin and its dependencies with pip install git+https://github.com/guiwitz/napari-sediment.git -U

aloboa commented 5 months ago

Unfortunately, I get the same problem after pip install git+https://github.com/guiwitz/napari-sediment.git -U

I have created a new environment and started again:

(base) alobo@pop-os:~$ conda create -n sediment2 python=3.9 napari pyqt -c conda-forge
(base) alobo@pop-os:~$ conda activate sediment2
(sediment2) alobo@pop-os:~$ pip install git+https://github.com/guiwitz/napari-sediment.git

and get:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
hyperspy 1.6.4 requires numba, which is not installed.
nbconvert 7.6.0 requires beautifulsoup4, which is not installed.
ncvue 4.1.2 requires netcdf4, which is not installed.
ncvue 4.1.2 requires pyshp, which is not installed.
Successfully installed cmap-0.2.1 cycler-0.12.1 distributed-2024.5.2 einops-0.8.0 filelock-3.14.0 h5py-3.11.0 ipython-genutils-0.2.0 matplotlib-scalebar-0.8.1 microfilm-0.2.1 napari-annotation-project-0.1.1 napari-convpaint-0.4.0 napari-guitils-0.1.0 napari-matplotlib-2.0.1 napari-sediment-0.1.dev309+g5655932 nvidia-cublas-cu12-12.1.3.1 nvidia-cuda-cupti-cu12-12.1.105 nvidia-cuda-nvrtc-cu12-12.1.105 nvidia-cuda-runtime-cu12-12.1.105 nvidia-cudnn-cu12-8.9.2.26 nvidia-cufft-cu12-11.0.2.54 nvidia-curand-cu12-10.3.2.106 nvidia-cusolver-cu12-11.4.5.107 nvidia-cusparse-cu12-12.1.0.106 nvidia-nccl-cu12-2.20.5 nvidia-nvjitlink-cu12-12.5.40 nvidia-nvtx-cu12-12.1.105 pyparsing-3.1.2 pyrsistent-0.20.0 scikit-learn-1.5.0 sortedcontainers-2.4.0 spectral-0.23.1 tblib-3.0.0 threadpoolctl-3.5.0 torch-2.3.0 torchvision-0.18.0 triton-2.3.0 webencodings-0.5.1 zict-3.0.0

I start napari, select napari Sediment and get the same problem:


RuntimeError: Failed to import command at 'napari_sediment.sediment_widget:SedimentWidget': module 'numpy' has no attribute 'complex'.
`np.complex` was a deprecated alias for the builtin `complex`. To avoid this error in existing code, use `complex` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.complex128` 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

My conda list is now:

(sediment2) alobo@pop-os:~$ conda list
# packages in environment at /home/alobo/miniconda3/envs/sediment2:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
alabaster                 0.7.16             pyhd8ed1ab_0    conda-forge
alsa-lib                  1.2.11               hd590300_1    conda-forge
annotated-types           0.7.0              pyhd8ed1ab_0    conda-forge
aom                       3.9.0                hac33072_0    conda-forge
app-model                 0.2.7              pyhd8ed1ab_0    conda-forge
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
asciitree                 0.3.3                      py_2    conda-forge
asttokens                 2.4.1              pyhd8ed1ab_0    conda-forge
attr                      2.5.1                h166bdaf_1    conda-forge
attrs                     23.2.0             pyh71513ae_0    conda-forge
babel                     2.14.0             pyhd8ed1ab_0    conda-forge
blosc                     1.21.5               hc2324a3_1    conda-forge
brotli                    1.1.0                hd590300_1    conda-forge
brotli-bin                1.1.0                hd590300_1    conda-forge
brotli-python             1.1.0            py39h3d6467e_1    conda-forge
brunsli                   0.1                  h9c3ff4c_0    conda-forge
bzip2                     1.0.8                hd590300_5    conda-forge
c-blosc2                  2.14.4               hb4ffafa_1    conda-forge
ca-certificates           2024.6.2             hbcca054_0    conda-forge
cachey                    0.2.1              pyh9f0ad1d_0    conda-forge
cairo                     1.18.0               h3faef2a_0    conda-forge
certifi                   2024.2.2           pyhd8ed1ab_0    conda-forge
charls                    2.4.2                h59595ed_0    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
click                     8.1.7           unix_pyh707e725_0    conda-forge
cloudpickle               3.0.0              pyhd8ed1ab_0    conda-forge
cmap                      0.2.1                    pypi_0    pypi
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
comm                      0.2.2              pyhd8ed1ab_0    conda-forge
cycler                    0.12.1                   pypi_0    pypi
cytoolz                   0.12.3           py39hd1e30aa_0    conda-forge
dask-core                 2024.5.2           pyhd8ed1ab_0    conda-forge
dav1d                     1.2.1                hd590300_0    conda-forge
dbus                      1.13.6               h5008d03_3    conda-forge
debugpy                   1.8.1            py39h3d6467e_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
distributed               2024.5.2                 pypi_0    pypi
docstring_parser          0.16               pyhd8ed1ab_0    conda-forge
docutils                  0.21.2             pyhd8ed1ab_0    conda-forge
einops                    0.8.0                    pypi_0    pypi
exceptiongroup            1.2.0              pyhd8ed1ab_2    conda-forge
executing                 2.0.1              pyhd8ed1ab_0    conda-forge
expat                     2.6.2                h59595ed_0    conda-forge
fasteners                 0.17.3             pyhd8ed1ab_0    conda-forge
filelock                  3.14.0                   pypi_0    pypi
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 h77eed37_2    conda-forge
fontconfig                2.14.2               h14ed4e7_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
freetype                  2.12.1               h267a509_2    conda-forge
freetype-py               2.4.0              pyhd8ed1ab_0    conda-forge
fsspec                    2024.6.0           pyhff2d567_0    conda-forge
gettext                   0.22.5               h59595ed_2    conda-forge
gettext-tools             0.22.5               h59595ed_2    conda-forge
giflib                    5.2.2                hd590300_0    conda-forge
glib                      2.80.2               hf974151_0    conda-forge
glib-tools                2.80.2               hb6ce0ca_0    conda-forge
graphite2                 1.3.13            h59595ed_1003    conda-forge
gst-plugins-base          1.24.4               h9ad1361_0    conda-forge
gstreamer                 1.24.4               haf2f30d_0    conda-forge
h5py                      3.11.0                   pypi_0    pypi
harfbuzz                  8.5.0                hfac3d4d_0    conda-forge
heapdict                  1.0.1                      py_0    conda-forge
hsluv                     5.0.4              pyhd8ed1ab_0    conda-forge
icu                       73.2                 h59595ed_0    conda-forge
idna                      3.7                pyhd8ed1ab_0    conda-forge
imagecodecs               2024.6.1         py39hbbab4d9_0    conda-forge
imageio                   2.34.1             pyh4b66e23_0    conda-forge
imagesize                 1.4.1              pyhd8ed1ab_0    conda-forge
importlib-metadata        7.1.0              pyha770c72_0    conda-forge
importlib_metadata        7.1.0                hd8ed1ab_0    conda-forge
importlib_resources       6.4.0              pyhd8ed1ab_0    conda-forge
in-n-out                  0.2.0              pyhd8ed1ab_0    conda-forge
ipykernel                 6.29.3             pyhd33586a_0    conda-forge
ipython                   8.18.1             pyh707e725_3    conda-forge
ipython-genutils          0.2.0                    pypi_0    pypi
jedi                      0.19.1             pyhd8ed1ab_0    conda-forge
jinja2                    3.1.4              pyhd8ed1ab_0    conda-forge
jsonschema                4.22.0             pyhd8ed1ab_0    conda-forge
jsonschema-specifications 2023.12.1          pyhd8ed1ab_0    conda-forge
jupyter_client            8.6.2              pyhd8ed1ab_0    conda-forge
jupyter_core              5.7.2            py39hf3d152e_0    conda-forge
jxrlib                    1.1                  hd590300_3    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
kiwisolver                1.4.5            py39h7633fee_1    conda-forge
krb5                      1.21.2               h659d440_0    conda-forge
lame                      3.100             h166bdaf_1003    conda-forge
lazy_loader               0.4                pyhd8ed1ab_0    conda-forge
lcms2                     2.16                 hb7c19ff_0    conda-forge
ld_impl_linux-64          2.40                 hf3520f5_2    conda-forge
lerc                      4.0.0                h27087fc_0    conda-forge
libaec                    1.1.3                h59595ed_0    conda-forge
libasprintf               0.22.5               h661eb56_2    conda-forge
libasprintf-devel         0.22.5               h661eb56_2    conda-forge
libavif16                 1.0.4                hd2f8ffe_4    conda-forge
libblas                   3.9.0           22_linux64_openblas    conda-forge
libbrotlicommon           1.1.0                hd590300_1    conda-forge
libbrotlidec              1.1.0                hd590300_1    conda-forge
libbrotlienc              1.1.0                hd590300_1    conda-forge
libcap                    2.69                 h0f662aa_0    conda-forge
libcblas                  3.9.0           22_linux64_openblas    conda-forge
libclang-cpp15            15.0.7          default_h127d8a8_5    conda-forge
libclang13                18.1.6          default_h5d6823c_0    conda-forge
libcups                   2.3.3                h4637d8d_4    conda-forge
libdeflate                1.20                 hd590300_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libevent                  2.1.12               hf998b51_1    conda-forge
libexpat                  2.6.2                h59595ed_0    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libflac                   1.4.3                h59595ed_0    conda-forge
libgcc-ng                 13.2.0               h77fa898_7    conda-forge
libgcrypt                 1.10.3               hd590300_0    conda-forge
libgettextpo              0.22.5               h59595ed_2    conda-forge
libgettextpo-devel        0.22.5               h59595ed_2    conda-forge
libgfortran-ng            13.2.0               h69a702a_7    conda-forge
libgfortran5              13.2.0               hca663fb_7    conda-forge
libglib                   2.80.2               hf974151_0    conda-forge
libgomp                   13.2.0               h77fa898_7    conda-forge
libgpg-error              1.49                 h4f305b6_0    conda-forge
libhwy                    1.1.0                h00ab1b0_0    conda-forge
libiconv                  1.17                 hd590300_2    conda-forge
libjpeg-turbo             3.0.0                hd590300_1    conda-forge
libjxl                    0.10.2               hcae5a98_0    conda-forge
liblapack                 3.9.0           22_linux64_openblas    conda-forge
libllvm15                 15.0.7               hb3ce162_4    conda-forge
libllvm18                 18.1.6               hb77312f_0    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libogg                    1.3.4                h7f98852_1    conda-forge
libopenblas               0.3.27          pthreads_h413a1c8_0    conda-forge
libopus                   1.3.1                h7f98852_1    conda-forge
libpng                    1.6.43               h2797004_0    conda-forge
libpq                     16.3                 ha72fbe1_0    conda-forge
libsndfile                1.2.2                hc60ed4a_1    conda-forge
libsodium                 1.0.18               h36c2ea0_1    conda-forge
libsqlite                 3.45.3               h2797004_0    conda-forge
libstdcxx-ng              13.2.0               hc0a3c3a_7    conda-forge
libsystemd0               255                  h3516f8a_1    conda-forge
libtiff                   4.6.0                h1dd3fc0_3    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libvorbis                 1.3.7                h9c3ff4c_0    conda-forge
libwebp-base              1.4.0                hd590300_0    conda-forge
libxcb                    1.15                 h0b41bf4_0    conda-forge
libxcrypt                 4.4.36               hd590300_1    conda-forge
libxkbcommon              1.7.0                h662e7e4_0    conda-forge
libxml2                   2.12.7               hc051c1a_1    conda-forge
libzlib                   1.3.1                h4ab18f5_1    conda-forge
libzopfli                 1.0.3                h9c3ff4c_0    conda-forge
locket                    1.0.0              pyhd8ed1ab_0    conda-forge
lz4-c                     1.9.4                hcb278e6_0    conda-forge
magicgui                  0.8.2              pyhd8ed1ab_1    conda-forge
markdown-it-py            3.0.0              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.5            py39hd1e30aa_0    conda-forge
matplotlib-inline         0.1.7              pyhd8ed1ab_0    conda-forge
matplotlib-scalebar       0.8.1                    pypi_0    pypi
mdurl                     0.1.2              pyhd8ed1ab_0    conda-forge
microfilm                 0.2.1                    pypi_0    pypi
mpg123                    1.32.6               h59595ed_0    conda-forge
msgpack-python            1.0.8            py39h95fdab5_0    conda-forge
mysql-common              8.3.0                hf1915f5_4    conda-forge
mysql-libs                8.3.0                hca2cd23_4    conda-forge
napari                    0.4.19.post1       pyh9208f05_0    conda-forge
napari-annotation-project 0.1.1                    pypi_0    pypi
napari-console            0.0.9              pyh9208f05_0    conda-forge
napari-convpaint          0.4.0                    pypi_0    pypi
napari-guitils            0.1.0                    pypi_0    pypi
napari-matplotlib         2.0.1                    pypi_0    pypi
napari-plugin-engine      0.2.0              pyhd8ed1ab_2    conda-forge
napari-sediment           0.1.dev309+g5655932          pypi_0    pypi
napari-svg                0.1.10             pyhd8ed1ab_0    conda-forge
ncurses                   6.5                  h59595ed_0    conda-forge
nest-asyncio              1.6.0              pyhd8ed1ab_0    conda-forge
networkx                  3.2.1              pyhd8ed1ab_0    conda-forge
npe2                      0.7.5              pyhd8ed1ab_0    conda-forge
nspr                      4.35                 h27087fc_0    conda-forge
nss                       3.100                hca3bf56_0    conda-forge
numcodecs                 0.12.1           py39h84cc369_1    conda-forge
numpy                     1.26.4           py39h474f0d3_0    conda-forge
numpydoc                  1.7.0              pyhd8ed1ab_1    conda-forge
nvidia-cublas-cu12        12.1.3.1                 pypi_0    pypi
nvidia-cuda-cupti-cu12    12.1.105                 pypi_0    pypi
nvidia-cuda-nvrtc-cu12    12.1.105                 pypi_0    pypi
nvidia-cuda-runtime-cu12  12.1.105                 pypi_0    pypi
nvidia-cudnn-cu12         8.9.2.26                 pypi_0    pypi
nvidia-cufft-cu12         11.0.2.54                pypi_0    pypi
nvidia-curand-cu12        10.3.2.106               pypi_0    pypi
nvidia-cusolver-cu12      11.4.5.107               pypi_0    pypi
nvidia-cusparse-cu12      12.1.0.106               pypi_0    pypi
nvidia-nccl-cu12          2.20.5                   pypi_0    pypi
nvidia-nvjitlink-cu12     12.5.40                  pypi_0    pypi
nvidia-nvtx-cu12          12.1.105                 pypi_0    pypi
openjpeg                  2.5.2                h488ebb8_0    conda-forge
openssl                   3.3.1                h4ab18f5_0    conda-forge
packaging                 24.0               pyhd8ed1ab_0    conda-forge
pandas                    2.2.2            py39hfc16268_1    conda-forge
parso                     0.8.4              pyhd8ed1ab_0    conda-forge
partd                     1.4.2              pyhd8ed1ab_0    conda-forge
pcre2                     10.43                hcad00b1_0    conda-forge
pexpect                   4.9.0              pyhd8ed1ab_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    10.3.0           py39h90c7501_0    conda-forge
pint                      0.23               pyhd8ed1ab_1    conda-forge
pip                       24.0               pyhd8ed1ab_0    conda-forge
pixman                    0.43.2               h59595ed_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_1    conda-forge
platformdirs              4.2.2              pyhd8ed1ab_0    conda-forge
ply                       3.11               pyhd8ed1ab_2    conda-forge
pooch                     1.8.1              pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.46             pyha770c72_0    conda-forge
psutil                    5.9.8            py39hd1e30aa_0    conda-forge
psygnal                   0.11.1             pyhd8ed1ab_0    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pulseaudio-client         17.0                 hb77b528_0    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pyconify                  0.1.6              pyhd8ed1ab_0    conda-forge
pydantic                  2.7.3              pyhd8ed1ab_0    conda-forge
pydantic-compat           0.1.2              pyhd8ed1ab_0    conda-forge
pydantic-core             2.18.4           py39ha68c5e3_0    conda-forge
pygments                  2.18.0             pyhd8ed1ab_0    conda-forge
pyopengl                  3.1.6              pyhd8ed1ab_1    conda-forge
pyparsing                 3.1.2                    pypi_0    pypi
pyproject_hooks           1.1.0              pyhd8ed1ab_0    conda-forge
pyqt                      5.15.9           py39h52134e7_5    conda-forge
pyqt5-sip                 12.12.2          py39h3d6467e_5    conda-forge
pyrsistent                0.20.0                   pypi_0    pypi
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.9.19          h0755675_0_cpython    conda-forge
python-build              1.2.1              pyhd8ed1ab_0    conda-forge
python-dateutil           2.9.0              pyhd8ed1ab_0    conda-forge
python-tzdata             2024.1             pyhd8ed1ab_0    conda-forge
python_abi                3.9                      4_cp39    conda-forge
pytz                      2024.1             pyhd8ed1ab_0    conda-forge
pywavelets                1.4.1            py39h44dd56e_1    conda-forge
pyyaml                    6.0.1            py39hd1e30aa_1    conda-forge
pyzmq                     26.0.3           py39ha1047a2_0    conda-forge
qt-main                   5.15.8              hc9dc06e_21    conda-forge
qtconsole-base            5.5.2              pyha770c72_0    conda-forge
qtpy                      2.4.1              pyhd8ed1ab_0    conda-forge
rav1e                     0.6.6                he8a937b_2    conda-forge
readline                  8.2                  h8228510_1    conda-forge
referencing               0.35.1             pyhd8ed1ab_0    conda-forge
requests                  2.32.3             pyhd8ed1ab_0    conda-forge
rich                      13.7.1             pyhd8ed1ab_0    conda-forge
rpds-py                   0.18.1           py39ha68c5e3_0    conda-forge
scikit-image              0.22.0           py39hddac248_2    conda-forge
scikit-learn              1.5.0                    pypi_0    pypi
scipy                     1.13.1           py39haf93ffa_0    conda-forge
setuptools                70.0.0             pyhd8ed1ab_0    conda-forge
shellingham               1.5.4              pyhd8ed1ab_0    conda-forge
sip                       6.7.12           py39h3d6467e_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.2.0                hdb0a2a9_1    conda-forge
snowballstemmer           2.2.0              pyhd8ed1ab_0    conda-forge
sortedcontainers          2.4.0                    pypi_0    pypi
spectral                  0.23.1                   pypi_0    pypi
sphinx                    7.3.7              pyhd8ed1ab_0    conda-forge
sphinxcontrib-applehelp   1.0.8              pyhd8ed1ab_0    conda-forge
sphinxcontrib-devhelp     1.0.6              pyhd8ed1ab_0    conda-forge
sphinxcontrib-htmlhelp    2.0.5              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1              pyhd8ed1ab_0    conda-forge
sphinxcontrib-qthelp      1.0.7              pyhd8ed1ab_0    conda-forge
sphinxcontrib-serializinghtml 1.1.10             pyhd8ed1ab_0    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
superqt                   0.6.6              pyh9208f05_0    conda-forge
svt-av1                   2.1.0                hac33072_0    conda-forge
tabulate                  0.9.0              pyhd8ed1ab_1    conda-forge
tblib                     3.0.0                    pypi_0    pypi
threadpoolctl             3.5.0                    pypi_0    pypi
tifffile                  2024.5.22          pyhd8ed1ab_0    conda-forge
tk                        8.6.13          noxft_h4845f30_101    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tomli-w                   1.0.0              pyhd8ed1ab_0    conda-forge
toolz                     0.12.1             pyhd8ed1ab_0    conda-forge
torch                     2.3.0                    pypi_0    pypi
torchvision               0.18.0                   pypi_0    pypi
tornado                   6.4              py39hd1e30aa_0    conda-forge
tqdm                      4.66.4             pyhd8ed1ab_0    conda-forge
traitlets                 5.14.3             pyhd8ed1ab_0    conda-forge
triton                    2.3.0                    pypi_0    pypi
typer                     0.12.3             pyhd8ed1ab_0    conda-forge
typer-slim                0.12.3             pyhd8ed1ab_0    conda-forge
typer-slim-standard       0.12.3               hd8ed1ab_0    conda-forge
typing-extensions         4.12.1               hd8ed1ab_0    conda-forge
typing_extensions         4.12.1             pyha770c72_0    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
urllib3                   2.2.1              pyhd8ed1ab_0    conda-forge
vispy                     0.14.2           py39h21f1d72_1    conda-forge
wcwidth                   0.2.13             pyhd8ed1ab_0    conda-forge
webencodings              0.5.1                    pypi_0    pypi
wheel                     0.43.0             pyhd8ed1ab_1    conda-forge
wrapt                     1.16.0           py39hd1e30aa_0    conda-forge
xcb-util                  0.4.0                hd590300_1    conda-forge
xcb-util-image            0.4.0                h8ee46fc_1    conda-forge
xcb-util-keysyms          0.4.0                h8ee46fc_1    conda-forge
xcb-util-renderutil       0.3.9                hd590300_1    conda-forge
xcb-util-wm               0.4.1                h8ee46fc_1    conda-forge
xkeyboard-config          2.41                 hd590300_0    conda-forge
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libice               1.1.1                hd590300_0    conda-forge
xorg-libsm                1.2.4                h7391055_0    conda-forge
xorg-libx11               1.8.9                h8ee46fc_0    conda-forge
xorg-libxau               1.0.11               hd590300_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h0b41bf4_2    conda-forge
xorg-libxrender           0.9.11               hd590300_0    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-xextproto            7.3.0             h0b41bf4_1003    conda-forge
xorg-xf86vidmodeproto     2.3.1             h7f98852_1002    conda-forge
xorg-xproto               7.0.31            h7f98852_1007    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
yaml                      0.2.5                h7f98852_2    conda-forge
zarr                      2.18.2             pyhd8ed1ab_0    conda-forge
zeromq                    4.3.5                h75354e8_4    conda-forge
zfp                       1.0.1                h59595ed_0    conda-forge
zict                      3.0.0                    pypi_0    pypi
zipp                      3.17.0             pyhd8ed1ab_0    conda-forge
zlib                      1.3.1                h4ab18f5_1    conda-forge
zlib-ng                   2.0.7                h0b41bf4_0    conda-forge
zstd                      1.5.6                ha6fb4c9_0    conda-forge
aloboa commented 5 months ago

I have installed netcdf4, hyperspy, numba, ncvue, pyshp and had a clean installation of

(sediment2) alobo@pop-os:~$ pip install git+https://github.com/guiwitz/napari-sediment.git

but the problem remains the same:

RuntimeError: Failed to import command at 'napari_sediment.sediment_widget:SedimentWidget': module 'numpy' has no attribute 'complex'.
`np.complex` was a deprecated alias for the builtin `complex`. To avoid this error in existing code, use `complex` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.complex128` 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
malloc_consolidate(): unaligned fastbin chunk detected

Convpaint starts up fine.

guiwitz commented 5 months ago

What happens when you do pip install colour-science? Not all packages that are requirements get installed, probably because your conda has a weird setting making it look for packages in other places. Maybe you can also post the result of conda config.

aloboa commented 5 months ago

What happens when you do pip install colour-science ?

(sediment2) alobo@pop-os:~$ pip install colour-science
Requirement already satisfied: colour-science in ./.local/lib/python3.9/site-packages (0.3.16)
Requirement already satisfied: imageio in ./miniconda3/envs/sediment2/lib/python3.9/site-packages (from colour-science) (2.34.1)
Requirement already satisfied: scipy<2.0.0,>=1.1.0 in ./.local/lib/python3.9/site-packages (from colour-science) (1.11.3)
Requirement already satisfied: six in ./miniconda3/envs/sediment2/lib/python3.9/site-packages (from colour-science) (1.16.0)
Requirement already satisfied: numpy<1.28.0,>=1.21.6 in ./miniconda3/envs/sediment2/lib/python3.9/site-packages (from scipy<2.0.0,>=1.1.0->colour-science) (1.26.4)
Requirement already satisfied: pillow>=8.3.2 in ./miniconda3/envs/sediment2/lib/python3.9/site-packages (from imageio->colour-science) (10.3.0)

But then same problem at starting napari Sedment

Maybe you can also post the result of conda config.

(sediment2) alobo@pop-os:~$ conda config --show
add_anaconda_token: True
add_pip_as_python_dependency: True
aggressive_update_packages:
  - ca-certificates
  - certifi
  - openssl
allow_conda_downgrades: False
allow_cycles: True
allow_non_channel_urls: False
allow_softlinks: False
allowlist_channels: []
always_copy: False
always_softlink: False
always_yes: None
anaconda_upload: None
auto_activate_base: True
auto_stack: 0
auto_update_conda: True
bld_path: 
changeps1: True
channel_alias: https://conda.anaconda.org
channel_priority: flexible
channel_settings: []
channels:
  - defaults
client_ssl_cert: None
client_ssl_cert_key: None
clobber: False
conda_build: {}
create_default_packages: []
croot: /home/alobo/miniconda3/conda-bld
custom_channels:
  pkgs/main: https://repo.anaconda.com
  pkgs/r: https://repo.anaconda.com
  pkgs/pro: https://repo.anaconda.com
custom_multichannels:
  defaults: 
    - https://repo.anaconda.com/pkgs/main
    - https://repo.anaconda.com/pkgs/r
  local: 
debug: False
default_channels:
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
default_python: 3.9
default_threads: None
deps_modifier: not_set
dev: False
disallowed_packages: []
download_only: False
dry_run: False
enable_private_envs: False
env_prompt: ({default_env}) 
envs_dirs:
  - /home/alobo/miniconda3/envs
  - /home/alobo/.conda/envs
error_upload_url: https://conda.io/conda-post/unexpected-error
execute_threads: 1
experimental: []
extra_safety_checks: False
fetch_threads: 5
force: False
force_32bit: False
force_reinstall: False
force_remove: False
ignore_pinned: False
json: False
local_repodata_ttl: 1
migrated_channel_aliases: []
migrated_custom_channels: {}
no_lock: False
no_plugins: False
non_admin_enabled: True
notify_outdated_conda: True
number_channel_notices: 5
offline: False
override_channels_enabled: True
path_conflict: clobber
pinned_packages: []
pip_interop_enabled: False
pkgs_dirs:
  - /home/alobo/miniconda3/pkgs
  - /home/alobo/.conda/pkgs
proxy_servers: {}
quiet: False
register_envs: True
remote_backoff_factor: 1
remote_connect_timeout_secs: 9.15
remote_max_retries: 3
remote_read_timeout_secs: 60.0
repodata_fns:
  - current_repodata.json
  - repodata.json
repodata_threads: None
report_errors: None
restore_free_channel: False
rollback_enabled: True
root_prefix: /home/alobo/miniconda3
safety_checks: warn
sat_solver: pycosat
separate_format_cache: False
shortcuts: True
show_channel_urls: None
signing_metadata_url_base: None
solver: libmamba
solver_ignore_timestamps: False
ssl_verify: True
subdir: linux-64
subdirs:
  - linux-64
  - noarch
target_prefix_override: 
trace: False
track_features: []
unsatisfiable_hints: True
unsatisfiable_hints_check_depth: 2
update_modifier: update_specs
use_index_cache: False
use_local: False
use_only_tar_bz2: False
verbosity: 0
verify_threads: 1
(sediment2) alobo@pop-os:~$ 
aloboa commented 5 months ago

Seems solved afer:

(sediment2) alobo@pop-os:~$ pip install colour-science -U
Requirement already satisfied: colour-science in ./.local/lib/python3.9/site-packages (0.3.16)
Collecting colour-science
  Downloading colour_science-0.4.4-py3-none-any.whl.metadata (53 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.5/53.5 kB 1.2 MB/s eta 0:00:00
Requirement already satisfied: imageio<3,>=2 in ./miniconda3/envs/sediment2/lib/python3.9/site-packages (from colour-science) (2.34.1)
Requirement already satisfied: numpy<2,>=1.22 in ./miniconda3/envs/sediment2/lib/python3.9/site-packages (from colour-science) (1.26.4)
Requirement already satisfied: scipy<2,>=1.8 in ./.local/lib/python3.9/site-packages (from colour-science) (1.11.3)
Requirement already satisfied: typing-extensions<5,>=4 in ./miniconda3/envs/sediment2/lib/python3.9/site-packages (from colour-science) (4.12.1)
Requirement already satisfied: pillow>=8.3.2 in ./miniconda3/envs/sediment2/lib/python3.9/site-packages (from imageio<3,>=2->colour-science) (10.3.0)
Downloading colour_science-0.4.4-py3-none-any.whl (2.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.3/2.3 MB 17.7 MB/s eta 0:00:00
Installing collected packages: colour-science
  Attempting uninstall: colour-science
    Found existing installation: colour-science 0.3.16
    Uninstalling colour-science-0.3.16:
      Successfully uninstalled colour-science-0.3.16
Successfully installed colour-science-0.4.4
guiwitz commented 5 months ago

Clearly pip looks in other places than the environment for packages and I don’t know why. In any case you can also try to use the --ignore-installed option with pip install to force pip to reinstall packages.