# Change Dynare version in the same session

**URL:** <https://forum.dynare.org/t/change-dynare-version-in-the-same-session/21723>\
**Category:** Documentation\
**Created:** [3 January 2023 02:11 UTC](https://forum.dynare.org/t/change-dynare-version-in-the-same-session/21723 "2023-01-03T02:11:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![macro\_modeller](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/b782af/32.png) [@macro\_modeller](https://forum.dynare.org/u/macro_modeller)\
**Post date:** [3 January 2023 02:11 UTC](https://forum.dynare.org/t/change-dynare-version-in-the-same-session/21723/1 "2023-01-03T02:11:51Z")

</div>

Hi everyone.

I would like to know if it is possible to change from lets say, Dynare 4.6.4 to 5.3 in the same Matlab session, I once tried cleaning the path but when running a model some “dates” conflict appeared.

Thanks.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [3 January 2023 15:18 UTC](https://forum.dynare.org/t/change-dynare-version-in-the-same-session/21723/2 "2023-01-03T15:18:51Z")

</div>

Yes, that is feasible, but you need to fully remove all paths set by the previous Dynare version used.

---

<div class="post-metadata">

**Author:** ![macro\_modeller](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/b782af/32.png) [@macro\_modeller](https://forum.dynare.org/u/macro_modeller)\
**Post date:** [3 January 2023 17:22 UTC](https://forum.dynare.org/t/change-dynare-version-in-the-same-session/21723/3 "2023-01-03T17:22:14Z")

</div>

Thnaks professor Pfeifer, I tried this experiment switching those two versions and worked, but I tried from 4.4.3 to 5.3 and the following error appeared:

```auto
The class 'dates' is used in its
own class definition as a base
class, property value, or attribute
value. This is not allowed.

Error in global_initialization (line 95)
oo_.initval_series = dseries();

Error in RBC_news_shock_model.driver (line 24)
global_initialization;

Error in dynare (line 281)
    evalin('base',[fname '.driver']);

```

Does this mean that there is no other solution besides restarting Matlab when switching from very old versions like 4.4.3 to new ones? I noticed that with that version there were more folders in the path than `c:\dynare\4.4.3\matlab` and cleared all of them but still came across this problem.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [5 January 2023 10:17 UTC](https://forum.dynare.org/t/change-dynare-version-in-the-same-session/21723/4 "2023-01-05T10:17:51Z")

</div>

Try using `restoredefaultpath`.

---

<div class="post-metadata">

**Author:** ![macro\_modeller](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/b782af/32.png) [@macro\_modeller](https://forum.dynare.org/u/macro_modeller)\
**Post date:** [12 January 2023 18:31 UTC](https://forum.dynare.org/t/change-dynare-version-in-the-same-session/21723/5 "2023-01-12T18:31:05Z")

</div>

Thanks for the suggestion professor, unfortunately I get the same error message with the `dates` class, is there any other workaround rather than restarting Matlab? Thanks!

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [13 January 2023 11:25 UTC](https://forum.dynare.org/t/change-dynare-version-in-the-same-session/21723/6 "2023-01-13T11:25:42Z")

</div>

No, I haven’t seen this issue before and it’s hard to reproduce without access to your machine.
