Problems using a Nupic example (Hotgym)


Is that the entire output of the make command?


No, the rest is gone, I just retrieved what my console had. I guess I could’ve ran some command to write the output to a file, but I forgot…


Honestly, I don’t know how to help you. I’ve never seen that compile error before, and I don’t know what bed.h is.


I think bed.h is just something from the previous line of code…there were thousands of lines of code being outputted so my console couldn’t keep all of it…

I’ll try to install a VM with Ubuntu 14.04, and try NuPIC that way.


I think the bed.h thing is a red herring. I have an idea, try to manually install the yaml packages as described here:

You might need to change the method for kubuntu.


@Addonis ’ system is proof positive of the existence of gremlins! :stuck_out_tongue: I think I went through this with him and the OpenJDK issue? Was that you @Addonis?


I installed them using the pip command, and the apt-get command. It was successful.

I still get the error when I run the “make -j4” though.
Here are some of the output from running that command:


Well, Kubuntu 15.04 & 15.10 is pretty unstable, although it was worse when it launched. I’m thinking of upgrading to 16.04.

Yea, I am having issues with Java too. But my Windows machine has even more problems. So at least that’s good…


Works flawlesly with Ubuntu14.04.4(64-bit) in a virtual machine. I’m running the right now, and it’s working fine (just takes a while to run it in a VM).


Do you know why the “–plot” is not working?

acheron@ubuntu:~/nupic/examples/opf/clients/hotgym/prediction/one_gym$ python --"plot"
Starts a NuPIC model from the model params returned by the swarm
and pushes each line of input from the gym into the model. Results
are written to an output file (default) or plotted dynamically if
the --plot option is specified.
NOTE: You must run ./ before this, because model parameters
are required to run NuPIC.

Creating model from rec-center-hourly...
Importing model params from model_params.rec_center_hourly_model_params
Traceback (most recent call last):
  File "", line 149, in <module>
    runModel(GYM_NAME, plot=plot)
  File "", line 139, in runModel
    runIoThroughNupic(inputData, model, gymName, plot)
  File "", line 99, in runIoThroughNupic
    output = nupic_output.NuPICPlotOutput([gymName])
  File "/home/acheron/nupic/examples/opf/clients/hotgym/prediction/one_gym/", line 116, in __init__
NameError: global name 'plt' is not defined

Hot Gym Anomaly Plot Error

This is a matplotlib issue, see:


You’re right, sudo apt-get install python-matplotlib fixes this error.


Do you mean that we don’t have to set up the mysql ourselves if we install nupic correctly?THANK!


Also,do we have to install mysql first?


MySQL is required for swarming only. If you are not running a swarm, you don’t need it installed or running. Because swarming tests run in our test suite, that means you’ll need MySQL if you want all tests to pass as well.


This issue (global name plt is not defined) got resolved by upgrading numpy to latest version: sudo pip install -U numpy


Sorry, I’m sure this is user error.

I’m on windows 7, Ran the swarm successfully, but when trying to run the I get an error that it can’t find the swarm models.

Here’s an image. you can see that the models were created correctly but it still gives me the “No model params exist for ‘rec-center-hourly’. Run swarm first!”

any suggestions? I haven’t modified the tutorial code.


According to the screenshot, there is not a in “model_params/”, rendering model_params.rec_center_hourly_model_params not a “package” from which MODEL_PARAMS may be imported. You could try to create an empty file called in the "odel_params/ directory. Another possible solution might be to fixup getModelParamsFromName() to either sys.path.append("model_params") or temporarily os.chdir("model_params") and remove “model_params.” from importName, bypassing the issue of model_params not being a package.

As for why there is no, at least according to there is no code to generate that, so I don’t know why it ever worked (I’m looking in your general direction @rhyolight). You could add the following line, which will force the creation of that file, allowing its use as a package:

open("", "w").close()


thanks! works perfectly, sorry I’m a python noob.


I think this will help: