[Debian-pan-maintainers] Debian: napari package: launcher brings error 'A distribution name is required'
Emmanuel FARHI
emmanuel.farhi at synchrotron-soleil.fr
Fri Aug 18 08:37:42 BST 2023
Hi Roland,
I've just tested the recent napari packages that have been prepared by
yourself.
The installation goes as it should with packages:
python3-app-model_0.2.0-2_all.deb python3-in-n-out_0.1.8-2_all.deb
python3-napari-plugin-engine_0.2.0-3_all.deb
python3-cachey_0.2.1-3_all.deb python3-magicgui_0.7.2-3_all.deb
python3-npe2_0.7.2-2_all.deb
python3-docstring-parser_0.15-2_all.deb
python3-napari_0.5.0~a1-3_all.deb python3-psygnal_0.9.1-2_all.deb
obtained from tracker.debian.org
Then I have created a small launcher script for the GUI itself:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from napari.__main__ import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
In principle, the main GUI should be displayed (at least it does from a
pip3 installation in a venv).
The execution in a vanilla Bookworm with Cinnamon brings an error:
Traceback (most recent call last):
File "/home/lambda/Downloads/./napari.run", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3/dist-packages/napari/__main__.py", line 556,
in main
_maybe_rerun_with_macos_fixes()
File "/usr/lib/python3/dist-packages/napari/__main__.py", line 442,
in _maybe_rerun_with_macos_fixes
from napari._qt import API_NAME
File "/usr/lib/python3/dist-packages/napari/_qt/__init__.py", line
64, in <module>
from napari._qt.qt_event_loop import get_app, gui_qt, quit_app, run
File "/usr/lib/python3/dist-packages/napari/_qt/qt_event_loop.py",
line 14, in <module>
from napari import Viewer, __version__
File "<frozen importlib._bootstrap>", line 1231, in _handle_fromlist
File "/usr/lib/python3/dist-packages/napari/_lazy.py", line 48, in
__getattr__
submod = import_module(
^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/napari/viewer.py", line 8, in
<module>
from napari.components.viewer_model import ViewerModel
File "/usr/lib/python3/dist-packages/napari/components/__init__.py",
line 19, in <module>
from napari.components.layerlist import LayerList
File "/usr/lib/python3/dist-packages/napari/components/layerlist.py",
line 9, in <module>
from napari.layers import Layer
File "/usr/lib/python3/dist-packages/napari/layers/__init__.py", line
10, in <module>
from napari.layers.image import Image
File
"/usr/lib/python3/dist-packages/napari/layers/image/__init__.py", line
1, in <module>
from napari.layers.image import _image_key_bindings
File
"/usr/lib/python3/dist-packages/napari/layers/image/_image_key_bindings.py",
line 7, in <module>
from napari.layers.image.image import Image
File "/usr/lib/python3/dist-packages/napari/layers/image/image.py",
line 27, in <module>
from napari.layers.image._image_slice import ImageSlice
File
"/usr/lib/python3/dist-packages/napari/layers/image/_image_slice.py",
line 13, in <module>
from napari.utils import config
File "/usr/lib/python3/dist-packages/napari/utils/config.py", line 5,
in <module>
from napari.utils._octree import get_octree_config
File "/usr/lib/python3/dist-packages/napari/utils/_octree.py", line
11, in <module>
from napari.settings import get_settings
File "/usr/lib/python3/dist-packages/napari/settings/__init__.py",
line 5, in <module>
from napari.settings._napari_settings import (
File
"/usr/lib/python3/dist-packages/napari/settings/_napari_settings.py",
line 16, in <module>
from napari.settings._plugins import PluginsSettings
File "/usr/lib/python3/dist-packages/napari/settings/_plugins.py",
line 30, in <module>
class PluginsSettings(EventedSettings):
File "/usr/lib/python3/dist-packages/napari/settings/_plugins.py",
line 78, in PluginsSettings
class NapariConfig:
File "/usr/lib/python3/dist-packages/napari/settings/_plugins.py",
line 86, in NapariConfig
if running_as_bundled_app() or running_as_constructor_app():
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/napari/utils/misc.py", line 72,
in running_as_bundled_app
metadata = importlib.metadata.metadata(app_module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 998,
in metadata
return Distribution.from_name(distribution_name).metadata
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 561,
in from_name
raise ValueError("A distribution name is required.")
ValueError: A distribution name is required.
I do not exactly know what is the issue. Any idea ?
Thanks, Emmanuel.
--
signature
/ ___|__/\_| | | ____|_ _| | FARHI Emmanuel
\___ \\ | | | _| | || | Div Exp/Data Reduction and Analysis Team
___) /_ _| |___| |___ | || |___ Tel : +33 (1) 69 35 96 04
<callto:+33%20%281%29%2069%2035%2096%2004>
|____/ \/ |_____|_____|___|_____| Saint-Aubin BP 48 - 91192 GIF/YVETTE
CEDEX
SYNCHROTRON http://www.synchrotron-soleil.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-pan-maintainers/attachments/20230818/d96d3297/attachment.htm>
More information about the Debian-pan-maintainers
mailing list