numenta / nupic-legacy

Numenta Platform for Intelligent Computing is an implementation of Hierarchical Temporal Memory (HTM), a theory of intelligence based strictly on the neuroscience of the neocortex.
http://numenta.org/
GNU Affero General Public License v3.0
6.34k stars 1.56k forks source link

Failed install on Debian 3.16 #3702

Closed pianomanfrazier closed 7 years ago

pianomanfrazier commented 7 years ago

I tried a fresh install of NuPIC on a vm and was unsuccessful. A fresh install from the nupic repository failed because it failed to find the correct nupic bindings. So I built nupic.core from source and installed the correct bindings. After which I ran nupic-bindings-check and it passed. I then then tried to install nupic.

After installing nupic I ran nupic-bindings-check and got the following capnproto error:

testenv/local/lib/python2.7/site-packages/nupic.bindings-0.6.3-py2.7-linux-i686.egg/nupic/proto/RandomProto.capnp:0: failed: Duplicate ID @0x88eaee6db8e1f67c.
stack: 0xb491a023 0xb4af5c0d 0xb4ae9370 0xb4aebcef 0xb4aec195 0xb4af04dd 0xb4af05c4 0xb4af06a5 0xb4af06fe 0xb4ad0969 0xb4acfe1d 0xb4ad311c 0xb4ae8e17 0xb4af0439 0xb4ae9a88 0xb4ae9dc8

I also get this error when trying to run the One Hot Gym tutorial.

Here is the full stack trace:

(testenv) rfrazier@debian:~/nupic_install_test$ nupic-bindings-check
Traceback (most recent call last):
  File "/home/rfrazier/nupic_install_test/testenv/bin/nupic-bindings-check", line 11, in <module>
    load_entry_point('nupic.bindings==0.6.3', 'console_scripts', 'nupic-bindings-check')()
  File "/home/rfrazier/nupic_install_test/testenv/lib/python2.7/site-packages/nupic.bindings-0.6.3-py2.7-linux-i686.egg/nupic/bindings/check.py", line 60, in checkMain
    checkImportBindingsExtensions()
  File "/home/rfrazier/nupic_install_test/testenv/lib/python2.7/site-packages/nupic.bindings-0.6.3-py2.7-linux-i686.egg/nupic/bindings/check.py", line 39, in checkImportBindingsExtensions
    import nupic.bindings.algorithms
  File "/home/rfrazier/nupic_install_test/testenv/lib/python2.7/site-packages/nupic.bindings-0.6.3-py2.7-linux-i686.egg/nupic/bindings/algorithms.py", line 119, in <module>
    from nupic.proto.SpatialPoolerProto_capnp import SpatialPoolerProto
  File "capnp/lib/capnp.pyx", line 3949, in capnp.lib.capnp._Loader.load_module (capnp/lib/capnp.cpp:75559)
  File "capnp/lib/capnp.pyx", line 3928, in capnp.lib.capnp.load (capnp/lib/capnp.cpp:75047)
  File "capnp/lib/capnp.pyx", line 3251, in capnp.lib.capnp.SchemaParser.load (capnp/lib/capnp.cpp:65948)
capnp.lib.capnp.KjException: /home/rfrazier/nupic_install_test/testenv/local/lib/python2.7/site-packages/nupic.bindings-0.6.3-py2.7-linux-i686.egg/nupic/proto/RandomProto.capnp:0: failed: Duplicate ID @0x88eaee6db8e1f67c.
stack: 0xb491a023 0xb4af5c0d 0xb4ae9370 0xb4aebcef 0xb4aec195 0xb4af04dd 0xb4af05c4 0xb4af06a5 0xb4af06fe 0xb4ad0969 0xb4acfe1d 0xb4ad311c 0xb4ae8e17 0xb4af0439 0xb4ae9a88 0xb4ae9dc8
(testenv) rfrazier@debian:~/nupic_install_test$ uname -a
Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.43-2 (2017-04-30) i686 GNU/Linux
rhyolight commented 7 years ago

Since you built nupic.core locally, did you also check out the nupic python code at tip of master and install from source too? From nupic root, run python setup.py install --user to install tip from nupic source.

pianomanfrazier commented 7 years ago

Yes I installed nupic from source as well. Since I am using a virtualenv to install I did not use the --user flag.

rhyolight commented 7 years ago

Please confirm your nupic version with these instructions?

pianomanfrazier commented 7 years ago
(testenv) rfrazier@debian:~/nupic_install_test/nupic$ python -c 'import pkg_resources;n=pkg_resources.get_distribution("nupic");b=pkg_resources.get_distribution("nupic.bindings");print n.project_name, n.version;print b.project_name, b.version'
nupic 0.7.0
nupic.bindings 0.6.3
rhyolight commented 7 years ago

So that is strange. If you have installed from source code at tip of master, you should have:

nupic 0.8.1.dev0
nupic.bindings 0.7.1.dev0

Be sure to uninstall nupic completely and git pull from upstream to get the latest code before trying to install again.

pianomanfrazier commented 7 years ago

OK, I'll try again. I usually just create a new virtualenv and install again. That way I don't have to worry about uninstalling it.

rhyolight commented 7 years ago

Check to install you don't accidentally have nupic installed at the system level by running the uninstallation instructions outside of virtualenv.

pianomanfrazier commented 7 years ago

I don't see nupic 0.8.1.dev0 tag or branch. How do I get it?

rhyolight commented 7 years ago

It is tip of master, just git pull upstream master.

pianomanfrazier commented 7 years ago

This is all I could find on this repo. This is from a clean clone from this repo. Is 0.8.1.dev0 branch pushed to remote?

 git branch --list -r
  origin/HEAD -> origin/master
  origin/autofix/wrapped2_to3_fix
  origin/gh-pages
  origin/master

Here are the last couple entries from git ls-remote --tags:

9812ff059837732b1d28f833c393bb54325fb371        refs/tags/0.6.0
44f93d1c887147a098b3d298a28b901be0ea5fd7        refs/tags/0.7.0
097c15ca6d4034e824ffb3f3338cec3c3df40486        refs/tags/0.8.0
rhyolight commented 7 years ago

There is no 0.8.1.dev0 tag (and we don't use branches). We only tag releases when they are complete. You need to have the upstream remote pointing to git@github.com:numenta/nupic.git like this:

> git remote add upstream git@github.com:numenta/nupic.git
> git remote -v | grep upstream
upstream    git@github.com:numenta/nupic.git (fetch)
upstream    git@github.com:numenta/nupic.git (push)

Then run git pull upstream master and you should be at commit SHA 6e0d7946b702be42970d42e691bf0a58d11f95c4:

git rev-parse HEAD
6e0d7946b702be42970d42e691bf0a58d11f95c4

Accordingly, nupic.core should be at https://github.com/numenta/nupic.core/tree/8e5f2dbb37315f3b536a0339a3bf9e7f6b22cf9d:

cd $NUPIC_CORE
> git rev-parse HEAD
8e5f2dbb37315f3b536a0339a3bf9e7f6b22cf9d

These SHAs are both the latest commits to each repo, as of now (which we refer to as "tip of master").

pianomanfrazier commented 7 years ago

As a side note, I'm building from source because pip install nupic doesn't work. I get the following error:

  Could not find a version that satisfies the requirement nupic.bindings==0.7.0 (from nupic) (from versions: )
No matching distribution found for nupic.bindings==0.7.0 (from nupic)
rhyolight commented 7 years ago

I don't know why this is happening, there is a "manylinux" wheel on pypi for 0.7.0: https://pypi.python.org/pypi/nupic.bindings/0.7.0

Are you on a 32bit system?

pianomanfrazier commented 7 years ago

So I build it with the new versions and the problems still persist.

 python -c 'import pkg_resources;n=pkg_resources.get_distribution("nupic");b=pkg_resources.get_distribution("nupic.bindings");print n.project_name, n.version;print b.project_name, b.version'
nupic 0.8.1.dev0
nupic.bindings 0.7.1.dev0

And the capnp error:

 nupic-bindings-check
Traceback (most recent call last):
  File "/home/rfrazier/nupic_test2/testenv/bin/nupic-bindings-check", line 11, in <module>
    load_entry_point('nupic.bindings==0.7.1.dev0', 'console_scripts', 'nupic-bindings-check')()
  File "/home/rfrazier/nupic_test2/testenv/lib/python2.7/site-packages/nupic.bindings-0.7.1.dev0-py2.7-linux-i686.egg/nupic/bindings/check.py", line 60, in checkMain
    checkImportBindingsExtensions()
  File "/home/rfrazier/nupic_test2/testenv/lib/python2.7/site-packages/nupic.bindings-0.7.1.dev0-py2.7-linux-i686.egg/nupic/bindings/check.py", line 39, in checkImportBindingsExtensions
    import nupic.bindings.algorithms
  File "/home/rfrazier/nupic_test2/testenv/lib/python2.7/site-packages/nupic.bindings-0.7.1.dev0-py2.7-linux-i686.egg/nupic/bindings/algorithms.py", line 119, in <module>
    from nupic.proto.SpatialPoolerProto_capnp import SpatialPoolerProto
  File "capnp/lib/capnp.pyx", line 3949, in capnp.lib.capnp._Loader.load_module (capnp/lib/capnp.cpp:75559)
  File "capnp/lib/capnp.pyx", line 3928, in capnp.lib.capnp.load (capnp/lib/capnp.cpp:75047)
  File "capnp/lib/capnp.pyx", line 3251, in capnp.lib.capnp.SchemaParser.load (capnp/lib/capnp.cpp:65948)
capnp.lib.capnp.KjException: /home/rfrazier/nupic_test2/testenv/local/lib/python2.7/site-packages/nupic.bindings-0.7.1.dev0-py2.7-linux-i686.egg/nupic/proto/RandomProto.capnp:0: failed: Duplicate ID @0x88eaee6db8e1f67c.
stack: 0xb484c023 0xb4a27c0d 0xb4a1b370 0xb4a1dcef 0xb4a1e195 0xb4a224dd 0xb4a225c4 0xb4a226a5 0xb4a226fe 0xb4a02969 0xb4a01e1d 0xb4a0511c 0xb4a1ae17 0xb4a22439 0xb4a1ba88 0xb4a1bdc8

Not sure where the problem is. Perhaps the problem is with Cap'n Proto.

pianomanfrazier commented 7 years ago

Yes my VM is 32-bit. I'll try a 64-bit vm.

pianomanfrazier commented 7 years ago

I can now pip install nupic. However when I build from source in a clean environment I still get the error listed above.

rhyolight commented 7 years ago

Thanks for trying. We don't support 32 bit systems at this point. I'm not sure what the source build problem is, our CI is running in Ubuntu. We don't always work with the latest linux distros.