brisvag / blik

Python tool for visualising and interacting with cryo-ET and subtomogram averaging data.
https://brisvag.github.io/blik/
GNU General Public License v3.0
23 stars 8 forks source link

Dependency issues #130

Closed jdeschamps closed 1 year ago

jdeschamps commented 1 year ago

Hi!

A collaborator tried to use blik and had some issues. I could reproduce the errors with their data. I encountered problems with some of the dependencies, both when starting napari and then when starting the reader plugin.

1) Related to imageio==2.22.1 that prevents napari from starting. i would suggest to pin either imageio!==2.22.1 in setup.cfg or suggesting to pip install "napari[all]==0.4.15 in the Readme.

2) naaf version 0.3.1 doesn't have naaf.data submodule:

Traceback (most recent call last):
  File "/home/user/miniconda3/envs/blik/lib/python3.9/site-packages/npe2/_command_registry.py", line 33, in resolve
    self.function = utils.import_python_name(self.python_name)
  File "/home/user/miniconda3/envs/blik/lib/python3.9/site-packages/npe2/manifest/utils.py", line 240, in import_python_name
    mod = import_module(module_name)
  File "/home/user/miniconda3/envs/blik/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/home/user/miniconda3/envs/blik/lib/python3.9/site-packages/blik/reader.py", line 5, in <module>
    from naaf.data import Particles, Image
ModuleNotFoundError: No module named 'naaf.data'

Maybe you could pin naaf>=0.2.2, <=0.2.3 in a new version at least until you merge a branch compatible with naaf>=0.3.0?

brisvag commented 1 year ago

Hi @jdeschamps, sorry you encountered issues! The problem is caused by a mismatch with the dependency that I thought I would be able to work on silently without messing up anyone's system, so you just got unlucky and tried to use blik when it's broken :P Yes, pinning dependencies for now is a good idea.

I'm currently waiting for napari==0.4.17 (which should come in the coming 2 weeks hopefully) in order to push several updates that depend on it and make a new release. I will update you once that happens!

For the time being, forcing naaf==0.2.3 as you found out should be enough to help.

jdeschamps commented 1 year ago

Alright, if napari==0.4.17 is really that close, then I understand it makes no sense to make an in-between version.

Thanks!