[[OS X]]

# Contents
*Installing NuPIC on OS X Mavericks [#u488f455]
** Overview [#t24bb3b1]
>
This article briefly explains what NuPIC is and shows how to install NuPIC on OS X Mavericks.~
~
NuPIC is an algorithm for machine learning, based upon CLA/HTM Theory. This is developed by Numenta. This is not the newest version of Numenta's machine learning algorithm, but this is freely available at GitHub.~
~
More information and a copy of NuPIC are available at [[NuPIC WiKi>https://github.com/numenta/nupic/wiki]]~
~
For details of how to install and how to execute NuPIC on OS X Mavericks, please visit the article at GitHub:[[Running NuPIC on OS X>https://github.com/numenta/nupic/wiki/Running-NuPIC-on-OS-X]].~

** Requirements [#w7ac60e7]
>
- Python 2.7.5 (for this article)
-- pip 1.5.4
~
- OS X 10.9 Mavericks or later~
This a must-requirement. If you use older version of OS X, please update it.~
~
- Xcode 5 or later (including its Command Line Tools)
Please download Command Line Tools from Xcode. Command Line Tools include software packages, which are necessary for installing NuPIC.~
-- clang
-- Git (This is a part of Xcode)
-- Python (This is installed with Xcode, Xcode's Command Line Tools)
-- GCC or Clang (This is a part of Xcode, Xcode's Command Line Tools)

- homebrew 0.95
To use homebrew 0.95, please install the software packages shown below.
-- CMake (Needed to be installed separately as well as independently)
-- autoconf
-- automake
-- libtool

* Instructions for building NuPIC [#a6e903fa]
>
1. Checking OS
The minimum version of OS X is 10.9. If you are using older than OS X 10.9 Mavericks, please update your OS X. This article uses OS X 10.9.2.~
~
2. Setting up Build Tools
Install Xcode from App Store. Then, install Command Line Tools from the inside of Xcode.~
 Xcode > Open Developer Tool > More Developer Tools
Or, opening up Terminal, apply the command below~
 xcode-select –install

3. Installing homebrew
homebrew is a package installer. To use homebrew, install the software packages listed below.~
- automake
- libtool
- cmake

>
Cmake can be installed from the dmg file, which can be downloaded the wehis article uses the homebrew.~
To install homebrew, open up Terminal, apply the command line below.
<Code>

To check whether homebrew is installed correctly or not, apply the commands below for updating homebrew.
<Code>

If there are no problems on the installation of homebrew, install the packages listed above.
<Code>

4. Downloading source code of NuPIC
Check out source code from git. If you wish to contribute your modified code to the project of NuPIC, you will need your own git account.~
<Code>

5.  Configuring environment variable
To set up the environment variable, which is required for building and executing NuPIC, record the information of PATH and others on .profile file.~
Usually this file is set to be invisible. Please use Terminal to find this file.~
<Code>

Configure environment variables, which are needed for building and executing NuPIC. Open up ''.profile,'' and write down the information shown below.~
<Code #git....>

Then, go back to Terminal, open up .profile file, and make sure the information above is written correctly.
<Code $ printenv>

6. Installing pip
Installing pip, which is a package manager for Python.
 <Code>sudo easy_install pip

7. Installing Python libraries
Using pip, install Python libraries, which are required for NuPIC.
<Code>
If you use pip 1.5 or later, you may apply the command line below 
<Code>

If you encounter a permission denied error when you use pip, please run pip with sudo. For farther details of the error, please visit [[this page>https://github.com/numenta/nupic/blob/master/README.md]].


8. Building and Installing NuPIC
 Move to the NuPIC installation directory and execute the command below.
 <Code>Python setup.py install<Code>
<Code>
If you can see the message listed above, the installation of NuPIC is successful.

If you face a permission denied error when you use NuPIC, please execute NuPIC with sudo. Please go to this page for more information.

* Test [#md9192d3]
Please test that NuPIC can be executed properly when it is successfully built and installed.
** C++ Test [#j60baad1]
<Code>
<Code>
<Code>

** Python Unit Test [#c3f82012]
<Code>
<Code>

** Caution [#uad9ceb5]
>
You cannot build application with GUI of Xcode, even though it is built with Cmake.

*** Versions of Command Tools [#g07bcf5b]

* Revision History [#dc669f0c]

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