HNN install (Mac OS)
Opening a terminal window
- Open up macOS’s terminal.app by searching for terminal in Spotlight (upper right search icon). We will use this terminal for running the commands below.
Run pre-install checks
-
The command below will run a script to check for existing installations of prerequisites. If a compatible version is installed, it will say which steps can be skipped below.
curl -s "https://raw.githubusercontent.com/jonescompneurolab/hnn/master/installer/mac/check-pre.sh" | bash
Prerequisite 1: Xcode Command Line Tools
The Xcode Command Line Tools package includes utilities for compiling code from the terminal. This is needed for compiling NEURON mod files during the hnn-core installation.
-
To install the package, type the following from a terminal.app window:
xcode-select --install- If you get the following error, you can skip this step.
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
- If you get the following error, you can skip this step.
-
Then press
Installin the pop-up dialog.
Prerequisite 2: Miniconda (Python 3)
-
Run the commands below from a terminal window (as a regular user). This will create a python environment isolated from other installations on the system. You could use homebrew
brew install python3if you wish (has been tested with HNN), but this guide will cover the miniconda version.cd /tmp/ curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh sh ./Miniconda3-latest-MacOSX-x86_64.sh -b rm /tmp/Miniconda3-latest-MacOSX-x86_64.sh
Prepare the Python environment
-
Create a conda environment with the Python prerequisites for HNN.
conda env create -f environment.yml conda install -y -n hnn openmpi mpi4py -
Activate the HNN conda environment and python prerequisite packages
conda activate hnn pip install https://api.github.com/repos/jonescompneurolab/hnn-core/zipball/master pip install nlopt pip install mpi4py
Run post-install checks
curl -s "https://raw.githubusercontent.com/jonescompneurolab/hnn/master/installer/mac/check-post.sh" | bash
Download HNN source code
git clone https://github.com/jonescompneurolab/hnn.git
cd hnn
Run the HNN model
-
Start the HNN GUI from a terminal window. Make sure the hnn environment has been activated each time a terminal window is opened:
conda activate hnn python hnn.py -
The HNN GUI should show up. Make sure that you can run simulations by clicking the ‘Run Simulation’ button. This will run a simulation with the default configuration. After it completes, graphs should be displayed in the main window.
-
When you run simulations for the first time, two dialog boxes may pop-up and ask you for permission to allow connections through the firewall. Saying ‘Deny’ is fine since simulations will just run locally on your Mac.
-
You can now proceed to running the tutorials at https://hnn.brown.edu/index.php/tutorials/ . Some things to note:
- A directory called “hnn_out” exists in your home directory where the results from your simulations (data and param files) will be stored.
Upgrading to a new version of HNN
HNN Releases can be found on the GitHub releases page. You can also be notified of new releases by watching the hnn repository on GitHub.
To download the latest HNN release:
curl -OL https://github.com/jonescompneurolab/hnn/releases/latest/download/hnn.tar.gz
mkdir hnn_source_code
tar -x --strip-components 1 -f hnn.tar.gz -C hnn_source_code
cd hnn_source_code
conda activate hnn
python3 hnn.py
If you are using git, then run git pull origin master from the source code directory.
Troubleshooting
For Mac OS specific issues: please see the Mac OS troubleshooting page
If you run into other issues with the installation, please open an issue on our GitHub. Our team monitors these issues and will investigate possible fixes.
Another option for users that are running into problems with the above methods, we provide a VirtualBox VM pre-installed with HNN.