napari: Running from `napari` entry point fails after #5007

πŸ› Bug

running from our main entry point napari fails with the following error after #5007

(napari) ➜  napari git:(6d18f104) βœ— napari  # succesful launch!
(napari) ➜  napari git:(f5cee842) βœ— napari
Traceback (most recent call last):
  File "/Users/alisterburt/mambaforge/envs/napari/bin/napari", line 8, in <module>
    sys.exit(main())
  File "/Users/alisterburt/programming/napari/napari/__main__.py", line 506, in main
    _run()
  File "/Users/alisterburt/programming/napari/napari/__main__.py", line 297, in _run
    viewer = Viewer()
  File "/Users/alisterburt/programming/napari/napari/viewer.py", line 65, in __init__
    _initialize_plugins()
  File "/Users/alisterburt/programming/napari/napari/plugins/__init__.py", line 44, in _initialize_plugins
    mf = PluginManifest.from_distribution('napari')
  File "/Users/alisterburt/mambaforge/envs/napari/lib/python3.10/site-packages/npe2/manifest/schema.py", line 225, in from_distribution
    dist = metadata.distribution(name)  # may raise PackageNotFoundError
  File "/Users/alisterburt/mambaforge/envs/napari/lib/python3.10/importlib/metadata/__init__.py", line 957, in distribution
    return Distribution.from_name(distribution_name)
  File "/Users/alisterburt/mambaforge/envs/napari/lib/python3.10/importlib/metadata/__init__.py", line 548, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for napari

I will revert for now because this is pretty bad - we should add a test for this usage too

cc @jaimergp @psobolewskiPhD

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 26 (19 by maintainers)

Most upvoted comments

that’s likely the culprit - sorry, I should have caught this more quickly.

I’m now facing that it gets stuck on

Obtaining file:///Users/alisterburt/programming/napari
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... \

but I think we can revert #5027