Hi, there. I just wanna try out NAB demo on my CentOS with python 2.7.13 installed. I’ve already installed nupic(1.0.4.dev0) and nupic.bindings(1.0.1) from PyPI. When I try to run run.py, the compiler just throw the following errors:
Traceback (most recent call last):
File "run.py", line 178, in <module>
from nab.detectors.numenta.numenta_detector import NumentaDetector
File "/root/NAB/nab/detectors/numenta/numenta_detector.py", line 23, in <module>
from nupic.algorithms import anomaly_likelihood
File "/usr/local/lib/python2.7/site-packages/nupic-1.0.4.dev0-py2.7.egg/nupic/algorithms/__init__.py", line 27, in <module>
from nupic.bindings.math import NearestNeighbor
File "/usr/local/lib/python2.7/site-packages/nupic.bindings-1.0.1-py2.7-linux-x86_64.egg/nupic/bindings/math.py", line 49, in <module>
_math = swig_import_helper()
File "/usr/local/lib/python2.7/site-packages/nupic.bindings-1.0.1-py2.7-linux-x86_64.egg/nupic/bindings/math.py", line 45, in swig_import_helper
_mod = imp.load_module('_math', fp, pathname, description)
ImportError: /usr/local/lib/python2.7/site-packages/nupic.bindings-1.0.1-py2.7-linux-x86_64.egg/nupic/bindings/_math.so: invalid ELF header
I don’t think you have NuPIC installed properly. Looks like you installed from source, can you go into $NUPIC and run ./scripts/run_nupic_tests.py --unit and see if unit tests pass?
Just tried the code you provided, got these errors. Do I need to reinstall NuPIC?
Traceback (most recent call last):
File “./scripts/run_nupic_tests.py”, line 262, in
os.chdir(os.getenv(‘NUPIC’))
TypeError: coercing to Unicode: need string or buffer, NoneType found
Hi, Matt. I’ve managed to run the test code, but it returned the same result as I provided above. By the way, if I wanna run NAB demo, do I have to install nupic.core, or just nupic + nupic.bindings? Thank you.
_________ ERROR collecting tests/unit/nupic/regions/tm_region_test.py __________
ImportError while importing test module '/root/nupic/tests/unit/nupic/regions/tm_region_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/unit/nupic/regions/tm_region_test.py:33: in <module>
from nupic.regions.tm_region import TMRegion
/usr/local/lib/python2.7/site-packages/nupic-1.0.4.dev0-py2.7.egg/nupic/regions/tm_region.py:32: in <module>
from nupic.algorithms import (anomaly, backtracking_tm, backtracking_tm_cpp,
/usr/local/lib/python2.7/site-packages/nupic-1.0.4.dev0-py2.7.egg/nupic/algorithms/__init__.py:27: in <module>
from nupic.bindings.math import NearestNeighbor
/usr/local/lib/python2.7/site-packages/nupic.bindings-1.0.1-py2.7-linux-x86_64.egg/nupic/bindings/math.py:49: in <module>
_math = swig_import_helper()
/usr/local/lib/python2.7/site-packages/nupic.bindings-1.0.1-py2.7-linux-x86_64.egg/nupic/bindings/math.py:45: in swig_import_helper
_mod = imp.load_module('_math', fp, pathname, description)
E ImportError: /usr/local/lib/python2.7/site-packages/nupic.bindings-1.0.1-py2.7-linux-x86_64.egg/nupic/bindings/_math.so: invalid ELF header
I think I’m confused about how you have NuPIC installed. You said you installed nupic 1.0.4.dev0 from PyPi, but that’s not possible. We don’t publish dev builds to pypi. If you have 1.0.4.dev0 installed, you must have installed from source code. Can you follow these directions to find out what version you really have installed?