# Running Example Notebooks

**URL:** <https://discourse.pymc.io/t/running-example-notebooks/667>\
**Category:** Questions\
**Created:** [December 18, 2017, 7:03am UTC](https://discourse.pymc.io/t/running-example-notebooks/667 "2017-12-18T07:03:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![melodramaqueen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/melodramaqueen/32/427_2.png) [@melodramaqueen](https://discourse.pymc.io/u/melodramaqueen)\
**Post date:** [December 18, 2017, 7:03am UTC](https://discourse.pymc.io/t/running-example-notebooks/667/1 "2017-12-18T07:03:02Z")

</div>

I ran the first example notebook - Sampler Statistics and found the following two interdependent glitches(maybe)

The usage of  
%matplotlib inline

at

Line 7

> <https://github.com/melodramaqueen/pymc3-stuff/blob/46fe92dde39bba79763c935b1c864706bb66deae/SamplerStaistics.py#L7>

is supported only if IPython is installed.

Instead, we can use plt.show() after every figure we need to print.

> <https://github.com/melodramaqueen/pymc3-stuff/blob/46fe92dde39bba79763c935b1c864706bb66deae/SamplerStaistics.py#L16>

This does compromise on the quality of a few graphs.

We can add to the docs that IPython is required.  
What should be done?

Thanks

---

<div class="post-metadata">

**Author:** ![junpenglao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/junpenglao/32/8_2.png) [@junpenglao](https://discourse.pymc.io/u/junpenglao)\
**Post date:** [December 18, 2017, 10:05am UTC](https://discourse.pymc.io/t/running-example-notebooks/667/2 "2017-12-18T10:05:24Z")

</div>

They are meant to run as jupyter notebooks, as in general in a `.py` file you are not supposed to have `%matplotlib inline`.  
Do you have jupyter notebook installed? You should open a jupyter kernel and run the notebooks from the browser.

---

<div class="post-metadata">

**Author:** ![melodramaqueen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/melodramaqueen/32/427_2.png) [@melodramaqueen](https://discourse.pymc.io/u/melodramaqueen)\
**Post date:** [December 18, 2017, 10:09am UTC](https://discourse.pymc.io/t/running-example-notebooks/667/3 "2017-12-18T10:09:20Z")

</div>

Okay, Thanks!  
I’ll complete the installation and then run it.

---

<div class="post-metadata">

**Author:** ![twiecki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/twiecki/32/6930_2.png) [@twiecki](https://discourse.pymc.io/u/twiecki)\
**Post date:** [December 18, 2017, 4:42pm UTC](https://discourse.pymc.io/t/running-example-notebooks/667/4 "2017-12-18T16:42:25Z")

</div>

Archived on December 18, 2017, 4:42pm UTC


