labs.beatcraft.com

Procedure of How to build Numenta NuPIC on MacOS X Mavericks

This article is basically identical to the original procedure of how to build Numenta NuPIC on MacOS X Mavericks and reviews the whole build and installation process.

This follows the procedure, which is listed on “Getting Started wiki” at nupic repository. The nupic repository is located at numenta's account of Github.

How to execute NuPIC is written at the section of “Running NuPIC on OS X.”

Requirements

Build Procedure

  1. OS
    Please update to OS X 10.9 Mavericks if your Mac is not running other than Mac OS X 10.9.
    It is very difficult to build NuPIC on earlier version of Mac OS X other than Mac OS X 10.9. Mac OS X 10.9 or later is recommended. In this article Mac OS X 10.9.2 is used for replicating the procedure.

  2. Build Tools
    Install XCode 5 or later.
    Download it from App Store, and install it. Then, at Application Menu of XCode, please select,
    Xcode > OPen Developer Tool > More Developer Tools
    Then, as web pages of “Downloads for Apple Developers” is open, install the newest version of “Command Line Tools (OS X Mavericks) for Xcode.

    The versions of tools, which are used here are:
  1. homebrew
    To install other packages, which are required for the build procedure, install homebrew. To use home, Install the packages shown below.
  1. Downloading Source Code Checkout by git. A working directory “work” is created, and the downloaded source code is stored at this working directory.
    If you wish to contribute to NuPIC, please create own github.
    $ cd ~
    $ mkdir work
    $ cd work
    $ git clone https://github.com/numenta/nupic.git

  2. Environment Variable
    ~/.profile
    Store the environment variables, which are required for the build process and execution of NuPIC. Write down the environment variables into “.Profile”. Then, open up this file from Terminal with the command shown below. Make sure that what you have written is correctly stored in the file.
    $ printenv
    If you do not like storing these information variable in “.profile” file. You can write down these environment variables in any file. In such case, you have to do “source” every time and load to your shell before build and execute NuPIC.
    # Target source/repo path (where you cloned the repo). Default to $PWD
    export NUPIC=~/dev/nupic
    # NTA installation path
    export NTA=$NUPIC/nta/eng
    # Convenience variable for temporary build file
    export BUILDLIR=/tmp/ntabuild
    # Number of jobs to run in parallel (Optional)
    export MK_JOBS=3
    # Set up the rest of the necessary env variables. Must be after
    # setting $NTA.
    source $NUPIC/env.sh
    ~
  3. pip pip is a tool that manages Python Packages. Install pip
    $ sudo easy_install pip

  4. Installing Python Library To use pip, install the python library, which is necessary for NuPIC.
    $ sudo pip install -r $NUPIC/external/common/requirements.txt
    According to “Running NuPIC on OS X, if you install pip 1.5 or greater, you should apply the command shown below, which does have options. However, as far as tested here, the original command works fine.
    $ sudo pip install --allow-all-external --allow-unverified PILL --allow-unverified psutil -r $NUPIC/external/common/requirements.txt

  5. Build NuPIC Execute the build script. If the messages shown below appears on Terminal, the build process is successfully completed.
    $ $NUPIC/build.sh
    …
    …
    …
    Stdout redirected to;/Users/user_name/work/nupic/build_system/stdout.txt
    Build successful

Testing

After the build process is completed, NuPIC is tested for its correctly execution.

Note

Even though the build process uses CMake, the build precess encounters problems when it is executed by GUI of XCode.

Versions of Tools


Front page   New List of pages Search Recent changes   RSS of recent changes