Nupic.core and nupic source installation

Now, I’m trying to install nupic.core and nupic from the source code on AWS/ ubuntu1~16.04.4

First I have installed nupic.core following the instruction below.

And I got.

$ nupic-bindings-check Successfully imported nupic.bindings.

$python -c 'import pkg_resources;b=pkg_resources.get_distribution("nupic.bindings");print b.project_name, b.version' nupic.bindings 0.6.3

But in python

>>> import nupic.math Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named math

Then I installed nupic from source following below

But, I got the following error message.

$python -c 'import pkg_resources;n=pkg_resources.get_distribution("nupic");print n.project_name, n.version' Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 535, in get_distribution dist = get_provider(dist) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 415, in get_provider return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0] File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 943, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 829, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'nupic' distribution was not found and is required by the application

And same error is happening as follows.

>>> import nupic.math Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named math

I’m really wondering what is happening!!!

How did you install? You should be able to install with pip install nupic on Ubuntu…

No. I’m trying to install nupic from source code. Because I’m trying to install nupic and nupic.core on Raspberry Pi and I am facing almost similar results as described above. To check the case of Ubuntu, I tried to install nupic.core and nupic on Ubuntu.


Installing NuPIC From Source

To install from local source code, run from the repository root:

pip install .

Use the optional -e argument for a developer install.


Actually I have installed nupic by using the following command but nupic seems to be installed incorrectly.

sudo python setup.py develop --user

And then visiting the nupic installation page https://github.com/numenta/nupic and find the pip install . command. This is quite new for me. I have been playing with nupic for more than half year. I have been using sudo python setup.py develop --user.

Any way, I’d like to install nupic.core and nupic from source code and make those work.

Strange errors… could it be that the python version used during the nupic.bindings build was not the same as the python you are using when you execute?

I don’t use pyenv or other virtual python environments. My python version is Python 2.7.12. The following situation would never happen, I believe.

“the python version used during the nupic.bindings build was not the same as the python you are using when you execute”