Raspberry pi Nupic.core build failed

Now I’m trying to build Nupic.core on Raspberry pi.

By using "python setup.py install"
I got the following error messge.

[ 11%] Completed ‘Swig’
[ 11%] Built target Swig
Makefile:149: recipe for target ‘all’ failed
make: *** [all] Error 2
Traceback (most recent call last):
File “setup.py”, line 58, in

File “/home/pi/nupic.core/bindings/py/setup.py”, line 201, in
File “/home/pi/nupic.core/bindings/py/setup.py”, line 166, in getExtensionFiles
File “/home/pi/nupic.core/bindings/py/setup.py”, line 185, in generateExtensions
subprocess.check_call([“make”, “-j3”])
File “/home/pi/.pyenv/versions/2.7.13/lib/python2.7/subprocess.py”, line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘make’, ‘-j3’]’ returned non-zero exit status 2

And then: Developer Installation to o do incremental builds.
mkdir -p $NUPIC_CORE/build/scripts
cd $NUPIC_CORE/build/scripts …

Then I got the following message

See also “/home/pi/nupic.core/build/scripts/ThirdParty/Build/YamlStaticLib/CMakeFiles/CMakeOutput.log”.
external/CMakeFiles/YamlStaticLib.dir/build.make:107: recipe for target ‘ThirdParty/Stamp/YamlStaticLib/YamlStaticLib-configure’ failed
make[2]: *** [ThirdParty/Stamp/YamlStaticLib/YamlStaticLib-configure] Error 1
CMakeFiles/Makefile2:294: recipe for target ‘external/CMakeFiles/YamlStaticLib.dir/all’ failed
make[1]: *** [external/CMakeFiles/YamlStaticLib.dir/all] Error 2

I have checked many topics in this forum but I could not find how to fix.
Does anyone have an idea for solving this problem?

Koichi Tsujino

1 Like

We don’t inherently support 32b builds, but people have accomplished this in the past. See:

It has been years since I tried building for the Pi. You may need to compile some dependencies like YAML on your system manually.

1 Like

Thank you, Matt.

I’m going to check YAML.


I have carefully follow the suggested post below.


By using pyenv, Nupic core build is failed. Without using pyenv, I could build nupic core on a Raspbery Pi. I can import nupic.bindings in Python.

But, in the last step, when I try to install Nupic from source, I had a following error message.

pi@raspberrypi:~/nupic $ python setup.py develop --user
Traceback (most recent call last):
File “setup.py”, line 134, in
requirements = findRequirements()
File “setup.py”, line 121, in findRequirements
if nupicBindingsPrereleaseInstalled():
File “setup.py”, line 55, in nupicBindingsPrereleaseInstalled
if pkg_resources.parse_version(nupicDistribution.version).is_prerelease:
AttributeError: ‘tuple’ object has no attribute ‘is_prerelease’

I think this error would not be related to Raspbery Pi.

I’ m really wanted to run Nupic on a Rasberry Pi.
Any idea about this error?


Wrong python version? NuPIC is currently incompatible with python 3. Or a bad dependency?

Thanks, Mat.

Of course, I’m using python 2.7.
Let me check the dependency.

Those should be checked, right?



Yes, you can uninstall them all manually (pip uninstall xxxxx, then run the installation of nupic again, which will pull in the versions it wants.

I’m not sure if y’all got it working. Depending on your requirements, one thought is to use HTM.java and pi4j http://pi4j.com.


I’m coming back to this issue.

I’ve successfully installed nupic but when I import nupic.math,

ImportError: No module named bindings.math

Strange thing is by using Jupyter notebook, nupic.math is successfully imported.

Does anybody have any idea about this?

I’ve already checked sys.path. I could not find any reason.


This usually means that nupic.bindings is not installed properly. What versions are installed?

After installed Nupic.core, “import nupic.math” was worked. After Nupic was installed, it does not work.

I have checked the version which I installed. It seems OK!

python -c 'import pkg_resources;n=pkg_resources.get_distribution(“nupic”);b=pkg_resources.get_distribution(“nupic.bindings”);print n.project_name, n.version;print b.project_name, b.version’
nupic 0.6.0
nupic.bindings 0.6.0

By the way, how to install building nupic wiki page has gone!

“For details about checking out this repository and building in your local environment, see the Installing and Building NuPIC wiki page.”

Anyway, continue to try fixing this issue.

2 posts were split to a new topic: Bad Links