Can't figure out how to install (macOS)

I tried just using pip on the command line, but that results in two pages of errors such as:

pip install nengo nengo-gui 14:59:11
Collecting nengo
Downloading nengo-3.1.0-py3-none-any.whl (523 kB)
|████████████████████████████████| 523 kB 1.8 MB/s
Collecting nengo-gui
Downloading nengo_gui-0.4.8-py3-none-any.whl (841 kB)
|████████████████████████████████| 841 kB 35.9 MB/s
Requirement already satisfied: numpy>=1.13 in /Users/jstrout/opt/anaconda3/lib/python3.8/site-packages (from nengo) (1.19.2)
Installing collected packages: nengo, nengo-gui
Successfully installed nengo-3.1.0 nengo-gui-0.4.8
(base) √ DailyPurge % nengo 14:59:21
Traceback (most recent call last):
File “/Users/jstrout/opt/anaconda3/lib/python3.8/site-packages/numpy/core/init.py”, line 22, in
from . import multiarray
File “/Users/jstrout/opt/anaconda3/lib/python3.8/site-packages/numpy/core/multiarray.py”, line 12, in
from . import overrides
File “/Users/jstrout/opt/anaconda3/lib/python3.8/site-packages/numpy/core/overrides.py”, line 7, in
from numpy.core._multiarray_umath import (
ImportError: dlopen(/Users/jstrout/opt/anaconda3/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-darwin.so, 2): Library not loaded: @rpath/libopenblas.dylib
Referenced from: /Users/jstrout/opt/anaconda3/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-darwin.so
Reason: image not found

So, expanding the “Detailed Installation Instructions” on the Getting-Started page, it suggested using Anaconda, specifically:

open the Anaconda command prompt and do
pip install nengo nengo-gui

But I can’t find an Anaconda command prompt. I’ve spent 20 minutes searching docs at anaconda.com, and it sounds like maybe that’s a Windows thing? On Mac we have Anaconda-Navigator, a GUI program, but I can’t find a command line anywhere within it.

The Anaconda docs suggest that the proper way to install a package is to “Select the checkbox of the package you want to install, then click the Apply button”. I searched for and found nengo (3.1.0) and nengo-gui (0.4.8), and checked the checkboxes, but there is no Apply button anywhere I can see. I can’t figure out how to make it actually install anything.

I can launch Anaconda directly on the command line, but it doesn’t produce a command prompt at which I could type “pip” either. Instead it prints “anaconda: error: A sub command must be given.” Doing anaconda -h produces a big list of available commands, none of which are pip. None of them are clearly an “install” command either.

In desperation I dug up the old Java version, but that no longer runs, apparently because of this change. I even went so far as to download an older (version 11) JDK, but still no dice. Perhaps there is some version of the JDK that would make this work, but I know you no longer support this version of nengo anyway.

I’ve now spent an hour on this and I’m stumped. Can anyone give clear directions on how to install nengo on Mac? (Version 10.15.7 on x86 hardware, if that matters.)

Hi @jstrout, and welcome to the Nengo forums! :smiley:

I’m not a Mac user myself, but I have managed to get both Nengo, NengoGUI (the latest releases) as well as Nengo1.4 working on the test Mac machine I have with me (running MacOS 10.12.6 on x86)

You are correct, and the documentation might have to be updated to reflect the changes that Anaconda has made to their UI. As developers, we do most development through the console terminal, so we tend to use Miniconda, which is a stripped down version of Anaconda to save on installation space (since we don’t need the UI and other bells and whistles the full Ananconda comes with). To open up the “Anaconda command prompt”, select “Environments” from the left menu, then select the environment you want to work on, and an arrow icon should show up. If you press the arrow icon, there should be an option to “Open terminal”. This is the “Anaconda command prompt” the documentation is referring to. An image of this is below:

The following are the steps I did to install Nengo on my test Mac machiine:

  1. Start Anaconda navigator
  2. Go to the “Environments” tab
  3. Create a new environment for Nengo (we recommend not working in the base environment as it serves as a reference “clean” environment)
  4. In the newly created environment, open the terminal (see steps above)
  5. In the terminal, do pip install nengo nengo-gui
  6. Nengo should now work. Note that you’ll need to “activate” the Nengo environment whenever you want to use it. This is done by clicking the desired environment from the list. You can start NengoGUI by opening the terminal and issuing the nengo command (after it has been installed).

If the environment you are trying to install Nengo in was a clean environment, these errors should occur. The error you are experiencing seem to indicate that Numpy has not been properly installed in said environment, and the quickest fix would be to create a new Python environment and attempting the installation again (following the steps I outlined above).

I did also manage to get Nengo1.4 working on my Mac machine. After doing some research on the errors, it seemed like that even JDK v11 is too new to work with Nengo1.4. You’ll need JDK version <9, and fortunately, JDK v8 can be downloaded from the Oracle Java download page (scroll down about half way down the page). Note that you’ll need an Oracle account to download JDK8, but according to their documentation it should be supported until 2030. Once you have JDK8 installed, you’ll need to figure out what version of JDK is being used by default on your machine. Simply open a terminal and issue the command java --version. If the reported version is anything but java 8, you’ll need to an extra step in the Nengo 1.4 installation steps below.

Installation of Nengo1.4:

  1. Nengo 1.4 is no longer in development, but it is still available for download from the GitHub page. You’ll need to download the latest release (the zip file) from here.
  2. Extract the contents of the zip file to a location on your harddrive
  3. (If not JDK8 by default) Navigate to the location of the Nengo1.4 files, and edit the nengo executable (it’s a bash script). In the script, insert this line after the #!/usr/bin/env bash line.
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
  1. Save the file
  2. Open a terminal and navigate to the location of the Nengo1.4 files, and open Nengo1.4 by executing the command ./nengo. You can also navigate to the location of the Nengo1.4 files in the file explorer and open Nengo by double clicking on the nengo executable.

Note: If you experience memory issues (out of memory errors) when using Nengo1.4, you can work around this by increasing the amount of memory allocated to Nengo when it starts. Do this by editing the nengo executable script and changing the -Xmx parameter. As an example, -Xmx2g allocates a maximum of 2GB of ram to the Nengo1.4 process.