NAVis currently requires Python 3.7 or later. Below instructions assume that
you have already installed Python and its package manager
By the way
You can use NAVis without having to install anything on your local machine! Follow this link to open an example notebook in Google’s Colaboratory.
From pip, with “batteries included”¶
Install navis including optional dependencies plus a GUI backend for the terminal (see bottom of the page for details):
pip3 install navis[all] -U
From pip, as minimal install¶
On certain systems/setups (e.g. on the new M1 Macs with ARM CPU architecture)
you might run into issues during the full install. In that case
you can try installing a “minimal” version by dropping the
pip3 install navis -U
Please see below for a list of the dropped optional dependencies in case you want to try installing them manually!
Development branch from Github¶
To install the most recent development branch from Github:
pip3 install git+https://github.com/navis-org/navis@master
If you installed navis using
pip, mandatory dependencies will have been
installed automatically. Unless you used the “batteries included”
option, there are a few optional dependencies that e.g. provide
speed-boosts in certain situations or are required only for certain functions.
These extras can be installed directly, or along with navis with
pip3 install navis[extra1,extra2]
The user-facing extras, the dependencies they install, and how to install those dependencies directly, are below.
Faster than scipy’s cKDTree implementation. If available, will be used to speed up e.g. NBLAST. Important: on Linux I found that I need to set a
OMP_NUM_THREADS=4environment variable (see also
pykdtreedocs). Otherwise it’s actually slower than scipy’s KDTree.
pip3 install pykdtree
Pathos is a multiprocessing library. NAVis uses it to parallelize functions across lists of neurons.
pip3 install pathos
Slower alternative to ncollpyde.
pip3 install pyoctree
r: Rpy2 (
Provides interface with R. This allows you to use e.g. the natverse R packages. Note that this package is not installed automatically as it would fail if R is not already installed on the system. You have to install Rpy2 manually!
pip3 install rpy2
shapely: Shapely (
This is used to get 2D outlines of navis.Volumes.
pip3 install shapely
For 3D visualisation.
Vispy provides a high-performance viewer for 3D visualisation of neurons. Vispy itself has a choice of backends: the one which works for you will depend on your operating system, hardware, other installed packages, and how you’re using navis. The default, supplied with navis’
vispy-defaultextra, is pyside6; this works best when called from an
ipythonconsole. Each of vispy’s backends, listed here, can be installed through vispy and its extras, or navis’ vispy-* extras.
pip3 install navis[vispy-pyqt5] # or pip3 install vispy[pyqt5]
For speeding up some lookup tables.
Transforming data between some template Drosophila brains.
Reading and writing images, meshes, and skeletons in Neuroglancer precomputed format. This is required required for e.g. the MICrONs interface.