Install on Mac OS failed unit tests


Hi !

It is January 7, 2017…Happy New Year.

I am running
Mac OS Sierra version 10.12.2.
python version 2.7.10

And I am following the youtube video for doing an install of nupic.
I just did the pip install and the git clone so I have fairly fresh versions.

I had errors that look like this:

tests/unit/nupic/research/ SpatialPoolerBoostTest.testBoostingCPP FAILED
tests/unit/nupic/research/ SpatialPoolerBoostTest.testBoostingPY FAILED
tests/unit/nupic/research/ SpatialPoolerCompatibilityTest.testCompatibility1 FAILED
tests/unit/nupic/research/ SpatialPoolerCompatibilityTest.testCompatibility2 FAILED
tests/unit/nupic/research/ SpatialPoolerCompatibilityTest.testCompatibility3 FAILED
tests/unit/nupic/research/ SpatialPoolerCompatibilityTest.testCompatibilityNoLearn FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testAdaptSynapses FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testAvgColumnsPerInput FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testAvgConnectedSpanForColumn1D FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testAvgConnectedSpanForColumn2D FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testAvgConnectedSpanForColumnND FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testBumpUpWeakColumns FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testCalculateOverlap FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testCompute1 FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testCompute2 FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testExactOutput FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testInhibitColumns FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testInhibitColumnsGlobal FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testInhibitColumnsLocal FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testInitPermanence1 FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testInitPermanence2 FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testIsUpdateRound FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testMapColumn FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testMapPotential1Column1Input FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testMapPotential1D FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testMapPotential2D FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testOverlapsOutput FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testRaisePermanenceThreshold FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testRandomSPDoesNotLearn FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testStripNeverLearned FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testUpdateBoostFactors FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testUpdateDutyCycleHelper FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testUpdateInhibitionRadius FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testUpdateMinDutyCycleLocal FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testUpdateMinDutyCyclesGlobal FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testUpdatePermanencesForColumn FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testWriteRead FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testZeroOverlap_NoStimulusThreshold_GlobalInhibition FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testZeroOverlap_NoStimulusThreshold_LocalInhibition FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testZeroOverlap_StimulusThreshold_GlobalInhibition FAILED
tests/unit/nupic/research/ SpatialPoolerTest.testZeroOverlap_StimulusThreshold_LocalInhibition FAILED

Also, when I try to do the simple hotgym opf I get:

Phillips-iMac:simple phillipneal$ python
Traceback (most recent call last):
  File "", line 30, in <module>
    from nupic.frameworks.opf.metrics import MetricSpec
ImportError: No module named nupic.frameworks.opf.metrics

When I do the check for frameworks everything seems ok.

IPython 5.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import nupic

In [2]: import nupic.frameworks

In [3]: from nupic.frameworks.opf.metrics import MetricSpec

In [4]: quit

Help !!


It looks like you’re running the "pip install"ed version on nupic, but with unit tests that have been updated since the last nupic release. The last release was in November, but the Spatial Pooler changed in December.

You’ll probably want to install from the repo:

pip uninstall nupic
cd nupic
python develop [--user]


Hi Marcus,

Thank you for your quick response.
I uninstalled everywhere and verified with:

IPython 5.1.0 – An enhanced Interactive Python.
? -> Introduction and overview of IPython’s features.
%quickref -> Quick reference.
help -> Python’s own help system.
object? -> Details about ‘object’, use ‘object??’ for extra details.

In [1]: import nupic

ImportError Traceback (most recent call last)
in ()
----> 1 import nupic

ImportError: No module named nupic

In [2]: quit


git clone

Then I ran :

Phillips-iMac:nupic phillipneal$ python develop --user

and got:

error in nupic setup command: Invalid environment marker: platform_system==‘Linux’ or platform_system==‘Darwin’


Hi Marcus,

Should I just install an older version like :

pip install nupic==0.5.5



I am having similar problemas with Mac OS version 10.11. Any help would be greatly appreciated.


If you install nupic from binary (pip install nupic), that means you get the latest stable version of NuPIC, which could be days or weeks old. If you want to run unit tests from the source code, make sure that you have checked out proper commit SHA in git to sync the tests with the stable version of NuPIC.

For example, if you installed nupic 0.5.7, you should run this command in your git repo before running unit tests:

git fetch upstream

Where upstream is a remote that points to This will fetch any tags for releases from the remote.

git checkout tags/0.5.7

This will set your local code to match the release code. Beware this could alter any changes you’ve made to your local filesystem.

Now you can run tests.

Nupic test fails
Hot gym prediction swarming TypeError on mac
Nupic test fails
Unknown parameter 'maxBoost' when swarming

Hi Matt,

Thank you for your response.
It still doesn’t run ( I should probably get an Ubuntu box…sigh)

Here is the screen grab:

Phillips-iMac:nupic phillipneal$ git remote -v
origin (fetch)
origin (push)
upstream (fetch)
upstream (push)
Phillips-iMac:nupic phillipneal$ git fetch upstream
Phillips-iMac:nupic phillipneal$ git checkout tags/0.5.7
HEAD is now at 5cd6668… Prepare for 0.5.7 release by setting version and adding CHANGELOG notes.
Phillips-iMac:nupic phillipneal$ python ./scripts/ -u
Traceback (most recent call last):
File “./scripts/”, line 263, in
TypeError: coercing to Unicode: need string or buffer, NoneType found
Phillips-iMac:nupic phillipneal$


Ok, that’s a simple fix, just set the NUPIC env var to be the path to your nupic checkout, like this:

export NUPIC=/Users/mtaylor/nta/nupic

Now try running the test command again.


HI Matt,

Yep. That was the problem. I had to fight with my
PATH variable a little bit to sort out my Anaconda python from my
MAC OS python. After setting NUPIC, doing the git updates, I ran the unit tests
and everything seems to be ok.

Thank you very much for your patient help,



A post was split to a new topic: Test_db failure on Ubuntu