# Installing nupic on mac

**URL:** <https://discourse.numenta.org/t/installing-nupic-on-mac/5664>\
**Category:** NuPIC Community Fork\
**Created:** [March 23, 2019, 12:41pm UTC](https://discourse.numenta.org/t/installing-nupic-on-mac/5664 "2019-03-23T12:41:14Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![suma](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/suma/32/3770_2.png) [@suma](https://discourse.numenta.org/u/suma)\
**Post date:** [March 23, 2019, 12:41pm UTC](https://discourse.numenta.org/t/installing-nupic-on-mac/5664/1 "2019-03-23T12:41:14Z")

</div>

Is there a easy way to install nupic on Mac high Sierra os. I use python 3.7 and python 2.7.  
I have tried installed using the threads on installing Nupic. Finally gave up but want to try another time. Appreaciate some good pointers.

---

<div class="post-metadata">

**Author:** ![dmac](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/dmac/32/5842_2.png) [@dmac](https://discourse.numenta.org/u/dmac)\
**Post date:** [March 23, 2019, 1:33pm UTC](https://discourse.numenta.org/t/installing-nupic-on-mac/5664/2 "2019-03-23T13:33:52Z")

</div>

You could try installing the community fork of nupic.

We’ve removed a lot of the outdated dependencies & weirdness from nupic. It requires C++11, CMake, and an internet connection (it will automatically download the rest of the dependencies from github). There are instructions for buildings & installing the python portion of the library in the README.

> **[htm-community/nupic.cpp](https://github.com/htm-community/nupic.cpp)**
>
> Community fork. Implementation of core NuPIC algorithms in C++ (under construction) - htm-community/nupic.cpp

It comes with a big disclaimer: it is still under development and it might not work 100%.  
On the other hand, if it doesn’t work we (the volunteers developing it) will try to help fix it.

---

<div class="post-metadata">

**Author:** ![suma](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/suma/32/3770_2.png) [@suma](https://discourse.numenta.org/u/suma)\
**Post date:** [March 23, 2019, 2:22pm UTC](https://discourse.numenta.org/t/installing-nupic-on-mac/5664/3 "2019-03-23T14:22:00Z")

</div>

Thanks . I would like to import nupic. In python and use the nupic algorithms .

Will I need nupic core installation to do this.

Appreciate your inputs

---

<div class="post-metadata">

**Author:** ![dmac](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/dmac/32/5842_2.png) [@dmac](https://discourse.numenta.org/u/dmac)\
**Post date:** [March 23, 2019, 6:35pm UTC](https://discourse.numenta.org/t/installing-nupic-on-mac/5664/4 "2019-03-23T18:35:27Z")

</div>

> [@suma](#):
>
> Will I need nupic core installation to do this.

No. The community fork version of Nupic contains all of the materials needed to use the algorithms in python (version 2 and 3).

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [March 24, 2019, 12:35am UTC](https://discourse.numenta.org/t/installing-nupic-on-mac/5664/5 "2019-03-24T00:35:20Z")

</div>

NuPIC is only available for Python 2.7, where you should be able to run `pip install nupic`.

For a python 3 version of NuPIC, I suggest you work with the community fork as @dmac suggested.

---

<div class="post-metadata">

**Author:** ![suma](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/suma/32/3770_2.png) [@suma](https://discourse.numenta.org/u/suma)\
**Post date:** [March 24, 2019, 8:41am UTC](https://discourse.numenta.org/t/installing-nupic-on-mac/5664/6 "2019-03-24T08:41:33Z")

</div>

Thanks. I am now installing with the community fork. It is taking a long time…

I am getting boost download and install takes a while , go get coffee… I finished my lunch now but no signs… is this expected.

---

<div class="post-metadata">

**Author:** ![suma](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/suma/32/3770_2.png) [@suma](https://discourse.numenta.org/u/suma)\
**Post date:** [March 25, 2019, 6:40am UTC](https://discourse.numenta.org/t/installing-nupic-on-mac/5664/7 "2019-03-25T06:40:38Z")

</div>

Hello

I tried installing the community nupic fork on Mac. Installation starts and doesn’t go beyond getting boost… I left it for the whole night . Am I missing anything or is there requirement to take care of…

---

<div class="post-metadata">

**Author:** ![David\_Keeney](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/david_keeney/32/1616_2.png) [@David\_Keeney](https://discourse.numenta.org/u/David_Keeney)\
**Post date:** [March 25, 2019, 12:57pm UTC](https://discourse.numenta.org/t/installing-nupic-on-mac/5664/8 "2019-03-25T12:57:51Z")

</div>

@suma I am surprised this is not working for you. One of our unit test environments is OSx so this should work. Boost is only needed if the compiler cannot handle C++17 and std::filesystem. Unfortunately Apple Clang compiler (XCode 10.1) does not support std::filesystem.

The download could take around 15 min or so depending on your internet speed. It is big; around 100Mb.

An alternative is to manually download boost.

- download from: [https://dl.bintray.com/boostorg/release/1.69.0/source/boost\_1\_69\_0.tar.gz](https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.gz)
- rm -r ${REPOSITORY\_DIR}/build **(to clear the cmake cache in ThirdParty)**
- mkdir -p ${REPOSITORY\_DIR}/build/scripts
- mkdir -p ${REPOSITORY\_DIR}/build/ThirdParty/share
- copy to ${REPOSITORY\_DIR}/build/ThirdParty/share/boost.tar.gz **(note the name change)**.
- cd ${REPOSITORY\_DIR}/build/scripts
- cmake …/…

This will not make the boost download run any faster but it might isolate where the problem is. Once downloaded it should compile fairly quickly with the above procedure since we only need to compile the filesystem and system modules from boost.

Let me know if this works for you.

---

<div class="post-metadata">

**Author:** ![suma](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/suma/32/3770_2.png) [@suma](https://discourse.numenta.org/u/suma)\
**Post date:** [March 25, 2019, 5:10pm UTC](https://discourse.numenta.org/t/installing-nupic-on-mac/5664/9 "2019-03-25T17:10:24Z")

</div>

Hello David

Thanks for your inputs. I was able to get the installation run but got the following error in the end.

clang: **error:** no such file or directory: ‘arch’

clang: **error:** no such file or directory: ‘x86\_64’

clang: **error:** no such file or directory: ‘arch’

clang: **error:** no such file or directory: ‘x86\_64’

clang: **error:** no such file or directory: ‘arch’

clang: **error:** no such file or directory: ‘x86\_64’

error: command ‘gcc’ failed with exit status 1

Did I miss something? Appreciate your inputs.

---

<div class="post-metadata">

**Author:** ![David\_Keeney](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/david_keeney/32/1616_2.png) [@David\_Keeney](https://discourse.numenta.org/u/David_Keeney)\
**Post date:** [March 25, 2019, 8:32pm UTC](https://discourse.numenta.org/t/installing-nupic-on-mac/5664/10 "2019-03-25T20:32:06Z")

</div>

Those look like parts of compiler option flags that were in the wrong place.  
Can you open a new issue in nupic.cpp repository [https://github.com/htm-community/nupic.cpp/issues](https://github.com/htm-community/nupic.cpp/issues) then post the log for me. I need a little more info as to what it was trying to do when it issued this error.

Thanks.

---

<div class="post-metadata">

**Author:** ![suma](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/suma/32/3770_2.png) [@suma](https://discourse.numenta.org/u/suma)\
**Post date:** [March 26, 2019, 1:46am UTC](https://discourse.numenta.org/t/installing-nupic-on-mac/5664/11 "2019-03-26T01:46:12Z")

</div>

Hello David

I have added the new issue and the log. Appreciate your inputs. After installing, I would like to import nupic and import anomalylilelyhood from nupic.algorithms in my python application

---

<div class="post-metadata">

**Author:** ![David\_Keeney](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/david_keeney/32/1616_2.png) [@David\_Keeney](https://discourse.numenta.org/u/David_Keeney)\
**Post date:** [March 26, 2019, 3:58pm UTC](https://discourse.numenta.org/t/installing-nupic-on-mac/5664/12 "2019-03-26T15:58:45Z")

</div>

Resolution: We do not yet support Anaconda Python on the htm-community nupic.cpp repository.

---

<div class="post-metadata">

**Author:** ![suma](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/suma/32/3770_2.png) [@suma](https://discourse.numenta.org/u/suma)\
**Post date:** [March 26, 2019, 4:16pm UTC](https://discourse.numenta.org/t/installing-nupic-on-mac/5664/13 "2019-03-26T16:16:28Z")

</div>

Thanks. I will try with [python.org](http://python.org)
