Installing NuPIC on Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-96-generic x86_64)

Which issue are you referring to that is occurring? Also, do you have root access to the machine you are using? I had two different versions of 2.7 that were conflicting.

I originally set up my own Python 2.7 & pip environment under my home directory on a machine that I did not have root access to so that I would have full permissions over it. Curled the source, build, install, updated environment variables, etc. However that prompted the pip install issue from above. Installing from source in my home directory was successful but then caused the conflicting versions issue.

Ultimately what worked for me was uninstalling my custom Python environment and using the system level Python 2.7 & pip installation with --user attached to everything (which I should have done in the first place). On the machine I’m using, “which python” returns “usr/bin/python” and “which pip” returns “usr/local/bin/pip”.

If you don’t have root access, you absolutely must run “pip install nupic --user” with the flag so that the package is installed in “/.local/lib/python2.7/site-packages” when using the system level Python & pip.

I do have possible root access but if I simply run it with “pip install nupic --user” it does work. However I could not install nupic.core from source it kept the issue for the bindings:

    terminate called after throwing an instance of 'std::runtime_error'
    what():  initializeNumpy: numpy.core.multiarray failed to import.
    Aborted (core dumped)

Could not find the source of the issue. My python versions should not conflict usually.

@kaikun “pip install nupic --user” should install nupic.core automatically so there will be no need to build it from source separately if pip installed nupic successfully. That’s what it did for me, at least.

I would try uninstalling everything (nupic and nupic.core) and then just run “pip install nupic --user” without building anything from source. If you get the same error make sure you have the right version of Numpy installed and you’re installing/executing everything to/from the same Python installation.

1 Like