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



Trying to get NuPIC installed on the machine mentioned above. It’s a shared machine, so I’m installing under my home account directory without root access.

I’ve set up my own installation of Python 2.7.12 under my home directory with pycapnp, numpy, setuptools, wheel, cython and pip all installed properly and working. All are the latest versions available.

I’ve installed CMake 3.5.1 under my home directory and its working fine.

I’ve tried “pip install nupic” and “pip install nupic --user” and they both result in this error when trying to install nupic.bindings:

 Could not find a version that satisfies the requirement nupic.bindings==1.0.0 (from nupic) (from versions: 1.0.1)
 No matching distribution found for nupic.bindings==1.0.0 (from nupic)

When trying to run “pip install nupic.bindings” and “pip install nupic.bindings --user” I get the following error:

Complete output from command python egg_info:

Setup SWIG Python module
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build-n5QNa_/nupic.bindings/", line 212, in <module>
  File "/tmp/pip-build-n5QNa_/nupic.bindings/", line 48, in getVersion
    with open(os.path.join(REPO_DIR, "VERSION"), "r") as versionFile:
IOError: [Errno 2] No such file or directory: '/tmp/VERSION'

Command "python egg_info" failed with error code 1 in /tmp/pip-build-n5QNa_/nupic.bindings/

I’ve also tried installing the nupic core from the .whl files located at Specifically, I tried running “pip install nupic.bindings-1.0.2-cp27-cp27mu-manylinux1_x86_64.whl” which results in the following error:

nupic.bindings-1.0.2-cp27-cp27mu-manylinux1_x86_64.whl is not a supported wheel on this platform.




I am stumped about this. If anyone has clues, please share.


I know it doesn’t help, but we do run NuPIC on Ubuntu all the time in our continuous integration pipeline:


@bkutt Is this 32b Ubuntu? Because that will not work.


It’s definitely a 64 bit Ubuntu OS. This line from the error output

IOError: [Errno 2] No such file or directory: '/tmp/VERSION'

is confusing…not sure what it’s even looking for that it isn’t finding.


Regarding the /tmp/VERSION error, I just ran into that as well. Turns out that when installing nupic.bindings separately, only the bindings directory of the nupic.core repository is cloned. The setup script for nupic.bindings moves up two directories to find the VERSION file in what it thinks is /tmp/nupic.core, but is actually just /tmp (as only a subdir of nupic.core was cloned)

PY_BINDINGS = os.path.dirname(os.path.realpath(__file__))
REPO_DIR = os.path.abspath(os.path.join(PY_BINDINGS, os.pardir, os.pardir))

I cheaply fixed this by manually adding the /tmp/VERSION file, however later on it also fails to find nupic.bindings/requirements.txt, which, despite being in the bindings subdir, isn’t cloned at all either. I’m not too familiar with the inner workings of pip, but it seems to me it’s cloning some wrong version of nupic.bindings.


Interesting…It seems I’m also unable to force install a different version of nupic.bindings…the only available version reported by pip is 1.0.1. I wonder if installing from source might mitigate that.


For what it’s worth, I ended up installing it straight from the github source without any issues.


@JStruye Hey you and @bkutt have exactly the same install problem… please tell me the following and forgive me if you’ve already told me:

  • Operating system, if linux flavor what exact version?
  • bitiness 32 vs 64?
  • python version (also “which python”)
  • pip version (also “which pip”)

That would help us debug this!

  • Operating system, if linux flavor what exact version? = Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-96-generic x86_64)
  • bitiness 32 vs 64? = 64
  • python version (also “which python”) = python 2.7.12
  • pip version (also “which pip”) = pip 9.0.1

The location of python and pip on the machine I’m using are under my home directory on a shared Linux machine.

bjk4704@doors:~$ which pip

bjk4704@doors:~$ which python


@bkutt are you within a virtualenv?

  • Ubuntu 14.04.5 LTS in an LXC container runnning on Ubuntu 14.04.5 LTS 4.4.0-generic x86_64

  • 64b

  • Python2 2.7.6

  • pip 9.0.1

Inside the container:

root@jakob:~# which python2
root@jakob:~# which pip2


No, I am not within a virtualenv indicated by the absence of sys.real_prefix


I’m not able to install nupic.bindings successfully from source either.

bjk4704@doors:~/nupic.core$ nupic-bindings-check
terminate called after throwing an instance of 'std::runtime_error'
what():  initializeNumpy: numpy.core.multiarray failed to import.
Aborted (core dumped)


Do you mind sharing exactly what steps you took that allowed you to install from source? This is becoming a real headache.


Did you install both the nupic and nupic.core repositories from source? Additionally, what’s the output, in an interactive Python shell, for

>>>import numpy.core.multiarray

The error you posted seems to imply Numpy isn’t (fully) installed


For anybody reading in the future, I did manage to get NuPIC installed on the machine. It seems the bug for me was that there was conflicting versions of Python installed which resulted in the above errors. After resolving that, I was able to run simply “pip install nupic --user” without even building nupic.bindings first or building from source at all and all installed correctly and is tested working properly.


Hooray! I have found the python language very nice, but the python development / runtime environment extremely unstable and brittle (especially on a mac).


@bkutt Hey, I got the same issue running on ubuntu 16.04!
Do you know which python versions were conflicting?
My environment variable points to 2.7 python default version. However there are multiple installed (all symlinks listed):

/usr/bin/python2.7: Python 2.7.12
/usr/bin/python3.5: Python 3.5.2
/usr/bin/python3.5m: Python 3.5.2
/usr/bin/python3_6: Python 3.6.2
/usr/local/bin/python3.6: Python 3.6.2
/usr/local/bin/python3.6m: Python 3.6.2
/usr/share/Python-3.6.2/python: Python 3.6.2
/usr/share/Python-3.6.2/python3_6: Python 3.6.2


That’s a lot of snakes!! :snake::snake::snake::snake::snake::snake::snake::snake::snake::snake: