Install¶
requirements¶
We support Python 3.8-3.10 on Linux, OSX, and Windows. Similar Python versions (e.g. 3.7-3.10) will probably work, but we don’t regularly test using those versions.
managing your Python environment¶
We recommend installing neuron_morphology into a managed Python environment. Having multiple isolated environments lets you install incompatible packages (or different versions of the same package!) simultaneously and prevents unexpected behavior by utilities that rely on the system Python installation.
Two popular tools for managing Python environments are anaconda and venv. The rest of this document assumes that you have created and activated an environment using one of these tools. Using anaconda, this looks like:
conda create -y --name environment-name python=3.10
conda activate environment-name
and using venv:
python -m venv path/to/environment
source path/to/environment/bin/activate
installing from github¶
If you want to install a specific branch, tag, or commit of neuron_morphology, you can do so using pip:
pip install git+https://github.com/alleninstitute/neuron_morphology@dev
The dev branch contains cutting-edge features that might not have been formally released yet. By installing this way, you can access those features.
installing for development¶
If you want to work on neuron_morphology, you should first clone the repository, then install it in editable mode so that you can easily test your changes:
git clone https://github.com/alleninstitute/neuron_morphology
cd neuron_morphology
conda install -c conda-forge "fenics-dolfinx>=0.4.2" # optional for using streamlines
pip install gmsh # optional for using streamlines; note that certain platforms (e.g. Centos) may need to install from source
pip install -r requirements.txt -U
pip install -r test_requirements.txt -U
pip install -e .
installing from conda-forge [coming soon!]¶
To install using conda (, run
conda install -c conda-forge -y neuron_morphology
This method is preferred vs. pip, since some subpackages of neuron_morphology depend on 3rd party packages which don’t pip install well on all major platforms. Note that this use of conda as a package manager does not require or depend on using conda as your environment manager
installing from pypy [coming soon!]¶
You can install the latest release from pypy by running:
pip install neuron_morphology