# Run Nupic Either in IDE or Other, as Pure Python

**URL:** <https://discourse.numenta.org/t/run-nupic-either-in-ide-or-other-as-pure-python/1212>\
**Category:** NuPIC\
**Created:** [August 9, 2016, 6:07pm UTC](https://discourse.numenta.org/t/run-nupic-either-in-ide-or-other-as-pure-python/1212 "2016-08-09T18:07:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cogmission](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/cogmission/32/11_2.png) [@cogmission](https://discourse.numenta.org/u/cogmission)\
**Post date:** [August 9, 2016, 6:07pm UTC](https://discourse.numenta.org/t/run-nupic-either-in-ide-or-other-as-pure-python/1212/1 "2016-08-09T18:07:29Z")

</div>

Are there any flags or any other settings which prevents use of the SWIG bridges, so that I can be assured that I’m using pure Python?

---

<div class="post-metadata">

**Author:** ![cogmission](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/cogmission/32/11_2.png) [@cogmission](https://discourse.numenta.org/u/cogmission)\
**Post date:** [August 11, 2016, 3:39am UTC](https://discourse.numenta.org/t/run-nupic-either-in-ide-or-other-as-pure-python/1212/2 "2016-08-11T03:39:08Z")

</div>

@rhyolight Any idea about this?

---

<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:** [August 11, 2016, 6:34am UTC](https://discourse.numenta.org/t/run-nupic-either-in-ide-or-other-as-pure-python/1212/3 "2016-08-11T06:34:15Z")

</div>

I run all my programs from the command line 😟

---

<div class="post-metadata">

**Author:** ![cogmission](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/cogmission/32/11_2.png) [@cogmission](https://discourse.numenta.org/u/cogmission)\
**Post date:** [August 11, 2016, 7:12am UTC](https://discourse.numenta.org/t/run-nupic-either-in-ide-or-other-as-pure-python/1212/4 "2016-08-11T07:12:18Z")

</div>

Is there a flag though that specifies running in pure Python? How does the code “know” to use either SWIG implementation? For instance, the Python Connections vs the C++ one?

---

<div class="post-metadata">

**Author:** ![scott](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/scott/32/170_2.png) [@scott](https://discourse.numenta.org/u/scott)\
**Post date:** [August 11, 2016, 5:05pm UTC](https://discourse.numenta.org/t/run-nupic-either-in-ide-or-other-as-pure-python/1212/5 "2016-08-11T17:05:40Z")

</div>

If you are instantiating the algorithms directly then you can just select the Python implementations. These aren’t necessarily pure Python though since we use SWIG’ed things like the random number generator.

In the Network API, the algorithm regions have an implementation option that usually has a “cpp” and “py” option (or similar).

Does that answer your question?

---

<div class="post-metadata">

**Author:** ![cogmission](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/cogmission/32/11_2.png) [@cogmission](https://discourse.numenta.org/u/cogmission)\
**Post date:** [August 11, 2016, 5:58pm UTC](https://discourse.numenta.org/t/run-nupic-either-in-ide-or-other-as-pure-python/1212/6 "2016-08-11T17:58:59Z")

</div>

Ok, I just wanted to make sure. I swapped out the RNG with the UniversalRandom (for comparison), so I just wanted to make sure that I’m getting the same thing so that when I’m ready, I’ll be able to do a direct comparison for the NAB debug.

Thanks Scott! …and thank you too @rhyolight!) 🙂
