External Libraries

External libraries should be used sparingly, particularly for C++ code. There are a number of Python dependencies. Currently, external libraries are included in the repo directly but we will be moving away from that shortly.

New External Libraries Plan

The new plan for external libraries is to exclude them from the main NuPIC repository. Python dependencies will be listed in the requirements.txt with explicit version numbers and other dependencies will be listed in the README.md file with version requirements specified.

In addition to the main repository, there will be platform-specific repositories that include pre-installed dependencies. These will each have a bin, lib, etc. and will include a script that can be used to rebuild the installation. This will install binary libraries from tar files in the repo and Python modules from the requirements.txt in the main NuPIC repository. Additionally, there will be a shell script to set the NTA, PATH, PYTHONPATH, PYTHONHOME, LD_LIBRARY_PATH, and DYLD_LIBRARY_PATH environment variables.

Using the External Libraries Repositories

  • Get the latest version of the nupic and nupic-<platform> repositories.
  • Add a line to your .bashrc file to source the activate script in nupic-<platform>.
  • Additionally set NUPIC variable to point to your nupic repo in your .bashrc file. Optionally set BUILDDIR and MK_JOBS variables as well (see README.md for explanations).
  • Run cleanbuild.sh from the nupic repo.

Manually Installing Externals

You can also manually install the appropriate external libraries as specified in the README.md installation instructions.