Skip to content

ndi.python.install

  INSTALL - install NDI-python's command-line tools from inside MATLAB

    BINPATH = ndi.python.install() downloads NDI-python's end-user
    installer and runs it. The installer (uv-based) puts a private Python
    and NDI-python under NDI_HOME (~/.ndi, see ndi.python.ndiHome) and the
    console scripts in ~/.ndi/bin:

        ndi, napariViewGEF, napariViewLightsheet, uv   (.exe on Windows)

    BINPATH is that folder, as the installer reports it on its last line
    of output ("NDI installed: <folder>"). Afterwards
    ndi.python.findCommand finds the commands there with no further
    setup; its cache is cleared so a previous miss is forgotten.

    The installer is
        <Source>/install-ndi.sh    run with /bin/sh   (Linux, macOS)
        <Source>/install-ndi.ps1   run with powershell -NoProfile
                                   -ExecutionPolicy Bypass -File (Windows)
    and is always run non-interactively (--yes / -Yes). Its output is
    shown as it runs. A non-zero exit status raises
    'ndi:python:installFailed' with the installer's output.

    Optional Name-Value Arguments:
      Uninstall - remove what the installer installed (--uninstall /
                  -Uninstall) instead of installing. BINPATH is then
                  whatever the installer reported, usually ''.
                  Default false.
      AddToPath - let the installer add ~/.ndi/bin to the PATH of your
                  shell profile, so the commands also work in a terminal.
                  false passes --no-path / -NoPath. MATLAB does not need
                  this. Default true.
      Source    - where the installer scripts are: a URL (the folder
                  that holds them) or a local folder. Default
                  https://raw.githubusercontent.com/Waltham-Data-Science/NDI-python/main/install

    Example:
      ndi.python.install();
      ndi.python.findCommand('napariViewGEF')

    See also: ndi.python.findCommand, ndi.python.ndiHome,
              ndi.python.clearCommandCache