Nupic test fails

Hi, I have installed nupic but when I run tests with ./scripts/ in the end say that there are some fails. I work in OS windows and ubuntu 15.10 I have as virtual machine. I don’t know where is the problem.

1 Like

Does this topic help? Looks like a similar issue (your local code checkout is not the same version as your binary installation).

The version of Nupic is 0.5.7 and nupic.bindings==0.4.13. Python version is 2.7.10. I can not understand what you propose as solution if you can make it more clear because I’m in beginning phase with Nupic. I install with video tutorial But in the end when a run py.test tests/unit or the commande you propose ./scripts/ it gives me error: raise VersionConflict(dist, req) pkg_resources.VersionConflict: (pytest 2.5.1 (/home/zirije/.local/lib/python2.7/site-packages), Requirement.parse(‘pytest==2.7.2’)

I need to update that video, it is obsolete. It says to run:

pip install http://long-path-to-binary.whl

But the current method on any linux system is simpler:

pip install nupic

Can you try uninstalling and reinstalling with pip install nupic if you used the old command?

pip uninstall nupic -y; pip uninstall nupic.bindings -y
pip install nupic --user

I try it but gives me the same error again

Did you try checking out the code at 0.5.7 like I suggested?

git checkout tags/0.5.7

Yes now is working there are no fails. Thank you.

1 Like

hello Zirije_Hasani, could you please detail what did you do to make it work with no test fail.

I just make uninstall in both nupic and nupic.bindings with this commands: pip uninstall nupic -y; pip uninstall nupic.bindings -y and then install with pip install nupic --user after that I check the code with: git checkout tags/0.5.7 and then export paths
export NUPIC=pwd
export PATH=~/.local/bin:$PATH
and finally test from nupic folder with python ./scripts/


Hi, I have been looking for the failed test and I have arrived here but I couldn’t solve it.

I’m working with Ubuntu 16. At the beginning I had 94 failed test and now 45. I have reinstall pip in case I would have an old version (Now pip 9.0.1) , then I have reinstall nupic and did “git checkout tags/0.5.7”. But it still give me 45 failed.The las error I got was this:

self = <xml.etree.ElementTree.XMLParser object at 0x7faafc289710>, value = ExpatError(‘junk after document element: line 11, column 0’,)

_ def raiseerror(self, value):
_ err = ParseError(value)_
_ err.code = value.code_
_ err.position = value.lineno, value.offset_
> raise err
E ParseError: junk after document element: line 11, column 0

/usr/lib/python2.7/xml/etree/ ParseError
--------------------------------------------------------------- Captured stderr---------------------------------------------------------------
No handlers could be found for logger “”

I don’t know exactly why is that and what I can do. Besides I don’t know if that could affect the function of nupic.


Sorry @Stromson, I think I missed this message.

Can you try running the simple hotgym example?

> 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.

I have just run it I hope it is all right. I don’t have the same results so…? I mean I don’t know if the problem could affect the anomalies output…

INFO:main:After 100 records, 1-step altMAPE=23.183145
INFO:main:After 200 records, 1-step altMAPE=21.548877
INFO:main:After 300 records, 1-step altMAPE=21.227594
INFO:main:After 400 records, 1-step altMAPE=20.686270
INFO:main:After 500 records, 1-step altMAPE=20.417234
INFO:main:After 600 records, 1-step altMAPE=20.852339
INFO:main:After 700 records, 1-step altMAPE=20.907660
INFO:main:After 800 records, 1-step altMAPE=21.137106
INFO:main:After 900 records, 1-step altMAPE=20.875763
INFO:main:After 1000 records, 1-step altMAPE=20.789707

Ok, that makes me feel better. The scores might be a little different, that’s normal. It has only seen a 1000 records each time, so random number generation differences can affect it.

Your tests are likely failing because they are running (somehow) in a different python environment than where you built NuPIC. I’m not sure why this is happening (could be a number of things), but since this simple script ran properly, it should be fine.


Thank you very much¡¡¡