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
getExtensionFiles(platform)
File “/home/pi/nupic.core/bindings/py/setup.py”, line 166, in getExtensionFiles
generateExtensions()
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?

Regards,
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.

Regards,
Koichi

I have carefully follow the suggested post below.

https://discourse.numenta.org/t/running-nupic-on-raspberry-pi-having-problems/1667

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?

Regards,
Koichi

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?

https://github.com/numenta/nupic/blob/master/requirements.txt

Koichi

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.

2 Likes

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.

/home/pi
/usr/lib/python2.7
/usr/lib/python2.7/plat-arm-linux-gnueabihf
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/home/pi/.local/lib/python2.7/site-packages
/home/pi/nupic/src
/home/pi/.local/lib/python2.7/site-packages/prettytable-0.7.2-py2.7.egg
/home/pi/.local/lib/python2.7/site-packages/pyproj-1.9.3-py2.7-linux-armv7l.egg
/home/pi/.local/lib/python2.7/site-packages/DBUtils-1.1-py2.7.egg
/home/pi/.local/lib/python2.7/site-packages/PyMySQL-0.6.2-py2.7.egg
/home/pi/.local/lib/python2.7/site-packages/validictory-0.9.1-py2.7.egg
/home/pi/.local/lib/python2.7/site-packages/unittest2-0.5.1-py2.7.egg
/home/pi/.local/lib/python2.7/site-packages/PyYAML-3.10-py2.7-linux-armv7l.egg
/home/pi/.local/lib/python2.7/site-packages/python_dateutil-2.1-py2.7.egg
/home/pi/.local/lib/python2.7/site-packages/psutil-1.0.1-py2.7-linux-armv7l.egg
/home/pi/.local/lib/python2.7/site-packages/ordereddict-1.1-py2.7.egg
/home/pi/.local/lib/python2.7/site-packages/mock-1.0.1-py2.7.egg
/home/pi/.local/lib/python2.7/site-packages/asteval-0.9.1-py2.7.egg
/home/pi/.local/lib/python2.7/site-packages/nupic.bindings-0.6.0-py2.7-linux-armv7l.egg
/home/pi/.local/lib/python2.7/site-packages/coverage-3.7.1-py2.7-linux-armv7l.egg
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/gtk-2.0
/usr/lib/pymodules/python2.7

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