# Az.plot\_trace() gets an "No module named 'pymc3'" Error

**URL:** https://discourse.pymc.io/t/az-plot-trace-gets-an-no-module-named-pymc3-error/11355
**Category:** v5
**Tags:** bug, arviz
**Created:** [February 7, 2023, 10:20pm UTC](https://discourse.pymc.io/t/az-plot-trace-gets-an-no-module-named-pymc3-error/11355 "2023-02-07T22:20:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![wzh1895](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/wzh1895/32/6088_2.png) [@wzh1895](https://discourse.pymc.io/u/wzh1895)
#### Post date: [February 7, 2023, 10:20pm UTC](https://discourse.pymc.io/t/az-plot-trace-gets-an-no-module-named-pymc3-error/11355/1 "2023-02-07T22:20:28Z")

</div>

`print(pm. __version__ )`  
5.0.1  
`print(az. __version__ )`  
0.14.0

```auto
trace = pm.sample(...)
az.plot_trace(trace)

```

gives me the following Error:

`ModuleNotFoundError: No module named 'pymc3'`

It looks like arziv is still looking for pymc3 to convert a pymc trace object to its xarray.Dataset object, according to [arviz.convert\_to\_dataset — ArviZ 0.14.0 documentation](https://python.arviz.org/en/0.14.0/api/generated/arviz.convert_to_dataset.html)

Any response will be warmly appreciated.

Regards,

---

<div class="post-metadata">

### Author: ![cluhmann](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/cluhmann/32/3083_2.png) [@cluhmann](https://discourse.pymc.io/u/cluhmann)
#### Post date: [February 7, 2023, 10:35pm UTC](https://discourse.pymc.io/t/az-plot-trace-gets-an-no-module-named-pymc3-error/11355/2 "2023-02-07T22:35:23Z")

</div>

Welcome!

Are you calling `pm.sample()` with `return_inferencedata=False`? Can you check out the type of `trace`? It should be of type `InferenceData`.

---

<div class="post-metadata">

### Author: ![wzh1895](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/wzh1895/32/6088_2.png) [@wzh1895](https://discourse.pymc.io/u/wzh1895)
#### Post date: [February 7, 2023, 11:11pm UTC](https://discourse.pymc.io/t/az-plot-trace-gets-an-no-module-named-pymc3-error/11355/3 "2023-02-07T23:11:01Z")

</div>

Thanks for your prompt reply!

Yes, my `return_inferencedata` was set to `False`. Switching it to `True` solved my problem.

Fantastic, thanks a lot!
