NuPIC on Ubuntu 16.04 LTS did not install properly

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