NuPIC on Ubuntu 16.04 LTS did not install properly

I am having problems installing NuPIC on Ubuntu 16.04 LTS. Installation appears ok:

pip install . --user
Processing /opt/nupic
Requirement already satisfied: asteval==0.9.1 in /usr/local/lib/python2.7/dist-packages (from nupic==1.0.3.dev0)
Requirement already satisfied: coverage==3.7.1 in /home/martynas/.local/lib/python2.7/site-packages (from nupic==1.0.3.dev0)
Requirement already satisfied: mock==1.0.1 in /usr/local/lib/python2.7/dist-packages (from nupic==1.0.3.dev0)
Requirement already satisfied: ordereddict==1.1 in /usr/local/lib/python2.7/dist-packages (from nupic==1.0.3.dev0)
Requirement already satisfied: psutil==1.0.1 in /usr/local/lib/python2.7/dist-packages (from nupic==1.0.3.dev0)
Requirement already satisfied: pytest==3.0.7 in /usr/local/lib/python2.7/dist-packages/pytest-3.0.7-py2.7.egg (from nupic==1.0.3.dev0)
Requirement already satisfied: pytest-cov==2.5.0 in /usr/local/lib/python2.7/dist-packages/pytest_cov-2.5.0-py2.7.egg (from nupic==1.0.3.dev0)
Requirement already satisfied: pytest-xdist==1.16.0 in /usr/local/lib/python2.7/dist-packages/pytest_xdist-1.16.0-py2.7.egg (from nupic==1.0.3.dev0)
Requirement already satisfied: python-dateutil==2.1 in /usr/local/lib/python2.7/dist-packages (from nupic==1.0.3.dev0)
Requirement already satisfied: PyYAML==3.10 in /usr/local/lib/python2.7/dist-packages (from nupic==1.0.3.dev0)
Requirement already satisfied: unittest2==0.5.1 in /usr/local/lib/python2.7/dist-packages (from nupic==1.0.3.dev0)
Requirement already satisfied: validictory==0.9.1 in /usr/local/lib/python2.7/dist-packages (from nupic==1.0.3.dev0)
Requirement already satisfied: PyMySQL==0.6.2 in /usr/local/lib/python2.7/dist-packages (from nupic==1.0.3.dev0)
Requirement already satisfied: DBUtils==1.1 in /usr/local/lib/python2.7/dist-packages (from nupic==1.0.3.dev0)
Requirement already satisfied: pyproj==1.9.3 in /usr/local/lib/python2.7/dist-packages (from nupic==1.0.3.dev0)
Requirement already satisfied: prettytable==0.7.2 in /usr/local/lib/python2.7/dist-packages (from nupic==1.0.3.dev0)
Requirement already satisfied: numpy==1.12.1 in /usr/local/lib/python2.7/dist-packages/numpy-1.12.1-py2.7-linux-x86_64.egg (from nupic==1.0.3.dev0)
Requirement already satisfied: pycapnp==0.5.12 in /usr/local/lib/python2.7/dist-packages/pycapnp-0.5.12-py2.7-linux-x86_64.egg (from nupic==1.0.3.dev0)
Requirement already satisfied: py>=1.4.29 in /usr/local/lib/python2.7/dist-packages (from pytest==3.0.7->nupic==1.0.3.dev0)
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages (from pytest==3.0.7->nupic==1.0.3.dev0)
Requirement already satisfied: execnet>=1.1 in /usr/local/lib/python2.7/dist-packages (from pytest-xdist==1.16.0->nupic==1.0.3.dev0)
Requirement already satisfied: six in /usr/lib/python2.7/dist-packages (from python-dateutil==2.1->nupic==1.0.3.dev0)
Requirement already satisfied: appdirs>=1.4.0 in /usr/local/lib/python2.7/dist-packages (from setuptools->pytest==3.0.7->nupic==1.0.3.dev0)
Requirement already satisfied: packaging>=16.8 in /usr/local/lib/python2.7/dist-packages (from setuptools->pytest==3.0.7->nupic==1.0.3.dev0)
Requirement already satisfied: apipkg>=1.4 in /usr/local/lib/python2.7/dist-packages (from execnet>=1.1->pytest-xdist==1.16.0->nupic==1.0.3.dev0)
Requirement already satisfied: pyparsing in /usr/local/lib/python2.7/dist-packages (from packaging>=16.8->setuptools->pytest==3.0.7->nupic==1.0.3.dev0)
Installing collected packages: nupic
  Running setup.py install for nupic ... done
Successfully installed nupic-1.0.3.dev0

After running tests with python scripts/run_nupic_tests.py get this output (meaning the installation is ok):
==== 711 passed, 17 skipped, 8 xfailed, 5 pytest-warnings in 415.27 seconds ====

However, after running network example I get the following error:

    /opt/nupic$ python examples/network/network_api_demo.py 
    WARN:   PyRegion::createSpec failed: 0x7ffeeb54be90
    Traceback (most recent call last):
      File "examples/network/network_api_demo.py", line 203, in <module>
        network = createNetwork(dataSource)
      File "examples/network/network_api_demo.py", line 144, in createNetwork
        json.dumps({}))
      File "/usr/local/lib/python2.7/dist-packages/nupic/engine/__init__.py", line 639, in addRegion
        engine_internal.Network.addRegion(self, name, nodeType, nodeParams)
      File "/opt/nupic.core-master/bindings/py/src/nupic/bindings/engine_internal.py", line 1167, in addRegion
        return _engine_internal.Network_addRegion(self, *args, **kwargs)
    ImportError: No module named AnomalyLikelihoodRegion

The same error happens if I install with sudo. It also occurs on both of my machines. Do you have any ideas of what the culprit is? Thanks!

Here is the full list of commands with all tests passing:

#Installing NuPIC Core:

sudo gedit /etc/environment
add: NUPIC_CORE="/opt/nupic.core"

cd /opt
sudo git clone https://github.com/numenta/nupic.core.git
sudo chmod -R 777 nupic.core

mkdir -p $NUPIC_CORE/build/scripts
cd $NUPIC_CORE/build/scripts
cmake $NUPIC_CORE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=…/1.0.2 -DPY_EXTENSIONS_DIR=$NUPIC_CORE/bindings/py/src/nupic/bindings -DNUPIC_TOGGLE_INSTALL=ON

make -j8

make install

cd $NUPIC_CORE
python setup.py develop --user

cd $NUPIC_CORE/build/1.0.2/bin
./cpp_region_test
./unit_tests
./connections_performance_test
./prototest
./py_region_test
nupic-bindings-check
cd $NUPIC_CORE
python setup.py test
pip list
display: nupic.bindings (1.0.2.dev0, /opt/nupic.core/bindings/py/src)

#Installing NuPIC:

sudo gedit /etc/environment
add: NUPIC="/opt/nupic"

cd /opt
sudo git clone https://github.com/numenta/nupic.git
sudo chmod -R 777 nupic

cd $NUPIC
pip install . --user

python scripts/run_nupic_tests.py

pip list
display: nupic (1.0.3.dev0)

python $NUPIC/examples/network/network_api_demo.py

WARN:   PyRegion::createSpec failed: 0x7ffe9e829d10
Traceback (most recent call last):
  File "/opt/nupic/examples/network/network_api_demo.py", line 203, in <module>
    network = createNetwork(dataSource)
  File "/opt/nupic/examples/network/network_api_demo.py", line 144, in createNetwork
    json.dumps({}))
  File "/home/martynas/.local/lib/python2.7/site-packages/nupic/engine/__init__.py", line 639, in addRegion
    engine_internal.Network.addRegion(self, name, nodeType, nodeParams)
  File "/opt/nupic.core/bindings/py/src/nupic/bindings/engine_internal.py", line 1167, in addRegion
    return _engine_internal.Network_addRegion(self, *args, **kwargs)
ImportError: No module named AnomalyLikelihoodRegion

There is something wrong with this demo. I’ll look into it. In the meantime, run this demo:

python docs/examples/network/complete-network-example.py

This is the same code in the network quickstart docs.

The latter test did work. Thanks for a quick reply!

1 Like