Can I install nupic under Windows Subsystem for Linux?

In Windows 10 64-bit I have enabled Windows Subsystem for Linux, which gives me Bash on Ubuntu 14.04 LTS on Windows.

Can I install nupic under this subsystem?

1 Like

I don’t know. Try it out and let us know!

$ pip install nupic
Downloading/unpacking nupic
  Downloading nupic-0.6.0-py2-none-any.whl (4.8MB): 4.8MB downloaded
Cleaning up...
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/", line 122, in main
    status =, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle,
  File "/usr/lib/python2.7/dist-packages/pip/", line 1266, in prepare_files
  File "/usr/lib/python2.7/dist-packages/", line 2291, in requires
    dm = self._dep_map
  File "/usr/lib/python2.7/dist-packages/", line 2484, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/usr/lib/python2.7/dist-packages/", line 2517, in
    common = frozenset(reqs_for_extra(None))
  File "/usr/lib/python2.7/dist-packages/", line 2514, in reqs_for_extra
    if req.marker_fn(override={'extra':extra}):
  File "/usr/share/python-wheels/setuptools-3.3-py2.py3-none-any.whl/_markerlib/",
    line 113, in marker_fn
    return eval(compiled_marker, environment)
  File "<environment marker>", line 1, in <module>
NameError: name 'platform_system' is not defined

Make sure the environment has these dependencies installed.

Once I created a virtualenv (and then installed required dependencies) things went smoothly so it seems like pip install nupic installed without error.

Python 2.7.6 (default, Oct 26 2016, 20:30:19)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import nupic

Is there something else I can do to test the installation?

Can you try running the simple hotgym example without swarming?

> cd examples/opf/clients/hotgym/simple
> python
INFO:__main__:After 100 records, 1-step altMAPE=38.390240
INFO:__main__:After 200 records, 1-step altMAPE=29.214768
INFO:__main__:After 300 records, 1-step altMAPE=25.829702
INFO:__main__:After 400 records, 1-step altMAPE=24.262638
INFO:__main__:After 500 records, 1-step altMAPE=22.976900
INFO:__main__:After 600 records, 1-step altMAPE=22.890111
INFO:__main__:After 700 records, 1-step altMAPE=22.579927
INFO:__main__:After 800 records, 1-step altMAPE=22.859475
INFO:__main__:After 900 records, 1-step altMAPE=23.299378
INFO:__main__:After 1000 records, 1-step altMAPE=23.396538

If you get output like this, NuPIC is probably installed properly.

Thought I was close. Any idea?

$ python
Traceback (most recent call last):
  File "", line 31, in <module>
    from nupic.frameworks.opf.modelfactory import ModelFactory
  File "/home/realuser/venvs/nupic1/local/lib/python2.7/site-packages/nupic/frameworks/opf/", line 32, in <module>
    from clamodel import CLAModel
  File "/home/realuser/venvs/nupic1/local/lib/python2.7/site-packages/nupic/frameworks/opf/", line 53, in <module>
    import capnp
  File "/home/realuser/venvs/nupic1/local/lib/python2.7/site-packages/capnp/", line 34, in <module>
    from .version import version as __version__
  File "/home/realuser/venvs/nupic1/local/lib/python2.7/site-packages/capnp/", line 4, in <module>
  File "capnp/lib/capnp.pyx", line 1620, in init capnp.lib.capnp (capnp/lib/capnp.cpp:89810)
  File "capnp/lib/capnp.pyx", line 1605, in capnp.lib.capnp._EventLoop.__init__ (capnp/lib/capnp.cpp:35131)
capnp.lib.capnp.KjException: src/kj/async-unix.c++:262: failed: signalfd(-1, &signalFdSigset, SFD_NONBLOCK | SFD_CLOEXEC): Invalid argument
stack: 0x7f08ce2d1de9 0x7f08ce2d54ef 0x7f08ce2ce16c 0x7f08ce2c0ce0 0x7f08ce1ca794 0x7f08ce188cff 0x55f6db 0x7f08ce12775f 0x7f08ce1a2d99 0x427992 0x55642f 0x556838 0x5570ae 0x569cd8 0x4c8c8b 0x5264a8

If you want to check the installation without the repository handy, you can execute the following command line tool that gets installed by nupic.bindings (which is a dependency of nupic):


That will be installed in the bin directory inside the prefix you used to install the package so the bin path must be part of your PATH environment variable. If you need help with this then post the result of this:

python -c "import nupic; print nupic.__file__"

That doesn’t look good - looks like it could be a Windows-specific issue.

You could try installing capnp manually:

curl -O
tar zxf capnproto-c++-
cd capnproto-c++-
make -j6 check
sudo make install

Seems to compile ok but then looks like Test suite fails. So I guess it’s an issue with Capn Proto and WSL (Windows Subsystem for Linux)

PASS: capnp-evolution-test
FAIL: capnp-test
PASS: src/capnp/compiler/
Testsuite summary for Capn Proto
# TOTAL: 3
# PASS:  2
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

Between and, which we use for windows CI builds there may be enough details to get it up and running on Windows on your own, independent of the Ubuntu Linux subsystem. There are equivalent files in nupic.core for building it from source.

1 Like