# Can we run HTM in Python3 or Matlab?

**URL:** <https://discourse.numenta.org/t/can-we-run-htm-in-python3-or-matlab/6894>\
**Category:** Engineering\
**Created:** [December 8, 2019, 1:26pm UTC](https://discourse.numenta.org/t/can-we-run-htm-in-python3-or-matlab/6894 "2019-12-08T13:26:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shiva](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@shiva](https://discourse.numenta.org/u/shiva)\
**Post date:** [December 8, 2019, 1:26pm UTC](https://discourse.numenta.org/t/can-we-run-htm-in-python3-or-matlab/6894/1 "2019-12-08T13:26:23Z")

</div>

hi every one,  
as you know HTM work on python 2.7 and it will be expired soon. i have a question, i saw the formulate of HTM spatial pooling and I think it is simple neural network,and also i think it should be easy to implement in Matlab,am I correct? do you think implementation of this part of HTM (I mean HTM Spatial pooling) is possible in Matlab or in python 3?

---

<div class="post-metadata">

**Author:** ![marty1885](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/marty1885/32/1891_2.png) [@marty1885](https://discourse.numenta.org/u/marty1885)\
**Post date:** [December 8, 2019, 1:31pm UTC](https://discourse.numenta.org/t/can-we-run-htm-in-python3-or-matlab/6894/2 "2019-12-08T13:31:32Z")

</div>

> [@shiva](#):
>
> in python 3

The Community developed [HTM.core](https://github.com/htm-community/htm.core) support Python 3. And [Etaler’s Python binding](https://github.com/etaler/PyEtaler) is in a somewhat usable state now.

> [@shiva](#):
>
> in Matlab

I don’t think there’s a implementation for matlab. But you can always code it yourself.

---

<div class="post-metadata">

**Author:** ![shiva](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@shiva](https://discourse.numenta.org/u/shiva)\
**Post date:** [December 8, 2019, 2:03pm UTC](https://discourse.numenta.org/t/can-we-run-htm-in-python3-or-matlab/6894/3 "2019-12-08T14:03:58Z")

</div>

thanks a lot. can you explain more about why you don’t think there’s an implementation for Matlab?

---

<div class="post-metadata">

**Author:** ![marty1885](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/marty1885/32/1891_2.png) [@marty1885](https://discourse.numenta.org/u/marty1885)\
**Post date:** [December 8, 2019, 2:23pm UTC](https://discourse.numenta.org/t/can-we-run-htm-in-python3-or-matlab/6894/4 "2019-12-08T14:23:55Z")

</div>

The forum maintained list of HTM implementations only have one implemented in MATLAB. But it is a dead link and very old (possibly from the old Zeta1 days).

> [@Other HTM projects](https://discourse.numenta.org/t/other-htm-projects/2163):
>
> SEE ALSO: [HTM Implementations](https://numenta.org/implementations/) Projects (with sources): Language/Runtime Project Link Description Last Activity (as at June 2019) Python [iHTM](https://github.com/vsraptor/ihtm)[docs!](https://github.com/vsraptor/ihtm/docs) March 2021 Python [bbHTM](https://github.com/vsraptor/bbhtm)[great docs!](https://github.com/vsraptor/bbhtm/docs) May 2016 [pyHTM](https://github.com/carver/pyHTM) April 2011 [cla](https://github.com/gilsho/cla) February 2013 javascript [nupic-js](https://github.com/iandanforth/nupic-js) May 2014 [htm.JavaScript](https://github.com/htm-community/htm.JavaScript) by Ralf Seliger June 2015 [HTM.js](https://github.com/htm-community/htm.js) This project by @Paul_Lamb is a test implementation of HTM created to help Paul learn the basics, explore new concepts and theories, and share demos. It is designed to…

---

<div class="post-metadata">

**Author:** ![shiva](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@shiva](https://discourse.numenta.org/u/shiva)\
**Post date:** [December 8, 2019, 2:38pm UTC](https://discourse.numenta.org/t/can-we-run-htm-in-python3-or-matlab/6894/5 "2019-12-08T14:38:37Z")

</div>

you know,I am student and my Supervisor said me to implement HTM in Matlab, I search for some logical reason to say him it is not possible to implement HTM in Matlab.  
can you help me?

---

<div class="post-metadata">

**Author:** ![marty1885](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/marty1885/32/1891_2.png) [@marty1885](https://discourse.numenta.org/u/marty1885)\
**Post date:** [December 8, 2019, 2:44pm UTC](https://discourse.numenta.org/t/can-we-run-htm-in-python3-or-matlab/6894/6 "2019-12-08T14:44:27Z")

</div>

Well… Technically you can implement HTM in MATLAB (it is a Turing complete language after all). But it is very impractical.

1. MATLAB is optimized for matrix operations
  - But HTM is mostly scalar calculations

2. MATLAB is not designed to do stuff like this
3. MATLAB is rarely used in ML application
4. Use other’s code when possible is a lot easier and a lot less error occurs
