Skip to content

Add solution to mixed local and non-local install to troubleshooting guide #746

@TimMonko

Description

@TimMonko

However, I think the suggestion to remove napari from site-packages is not going to be the easiest thing for many people running into this error. Indeed, I think I might know how to do that, but confidence would be low. Perhaps it would be easiest to link to a section in the docs Troubleshooting page. The instructions could be a bit more, and even say, 'if you're unsure about this, we recommend creating a new environment'.

@Czaki would you be able to do that? We can add the link directly to the error message

Originally posted by @TimMonko in napari/napari#7745 (comment)

After, we follow-up with a PR to napari/napari linking the troubleshooting page to the error introduced in napari/napari#7745

From that PR description:

Description

Check if there is a mix of local and non-local installation of napari and then stop process.

Works only if run napari as module python -m napari not when start napari from script.

$ napari                                                                                                                              
Traceback (most recent call last):
  File "/home/czaki/.pyenv/versions/napari_3.12/bin/napari", line 5, in <module>
    from napari.__main__ import main
  File "/home/czaki/Projekty/napari/src/napari/__init__.py", line 52, in <module>
    _check_installation_path()
  File "/home/czaki/Projekty/napari/src/napari/__init__.py", line 49, in _check_installation_path
    raise RuntimeError(text)
RuntimeError: Mix of local and non local installation detected.
Napari is installed in editable mode but also found napari directory in site-packages.
Path to a napari directory: /home/czaki/.pyenv/versions/3.12.9/envs/napari_3.12/lib/python3.12/site-packages/napari.
Mix of local and non local installation is leading to hard to understand errors. Please remove the napari directory from site-packages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions