# Installation two GROMACS versions in the same computer

**URL:** <https://gromacs.bioexcel.eu/t/installation-two-gromacs-versions-in-the-same-computer/1103>\
**Category:** User discussions\
**Created:** [November 17, 2020, 6:02pm UTC](https://gromacs.bioexcel.eu/t/installation-two-gromacs-versions-in-the-same-computer/1103 "2020-11-17T18:02:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JakubH](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@JakubH](https://gromacs.bioexcel.eu/u/JakubH)\
**Post date:** [November 17, 2020, 6:02pm UTC](https://gromacs.bioexcel.eu/t/installation-two-gromacs-versions-in-the-same-computer/1103/1 "2020-11-17T18:02:14Z")

</div>

GROMACS version: 2018 and 2020  
GROMACS modification: No  
I use this manual to install GROMACS

> **[Installation guide — GROMACS 2018.4 documentation](http://manual.gromacs.org/documentation/2018.4/install-guide/index.html)**

  
I want to have on my computer both versions 2018.4 and 2020.2. I had Gromacs 2018.4 on my computer and then I installed 2020.2. Now when I use gmx it shows gromacs 2020.2, so my new GROMACS replace my old GROMACS, but I want them both. What I should do to have both of them. I try to create a virtual environment and install a newer version of GROMACS in a virtual environment, but even when I deactivate my virtual environment newer version of GROMACS replaces my old version. How to switch to an older version?

Thanks in advice.

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [November 17, 2020, 6:25pm UTC](https://gromacs.bioexcel.eu/t/installation-two-gromacs-versions-in-the-same-computer/1103/2 "2020-11-17T18:25:40Z")

</div>

If you want multiple versions, each has to be installed in a separate location (if you leave `CMAKE_INSTALL_PREFIX` as its default value when compiling, you’ll just over-write the existing version, so you need to specify this for at least one version). Then source the appropriate `GMXRC` each time you want to use the different version.

---

<div class="post-metadata">

**Author:** ![JakubH](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@JakubH](https://gromacs.bioexcel.eu/u/JakubH)\
**Post date:** [November 17, 2020, 6:35pm UTC](https://gromacs.bioexcel.eu/t/installation-two-gromacs-versions-in-the-same-computer/1103/3 "2020-11-17T18:35:28Z")

</div>

Thank you so much @jalemkul I’ve used GROMACS for two years, but still, I need to learn so many new things. You help me a lot and help a lot of other people who use GROMACS by giving a lot of answers. I also started learning GROMACS two years ago with your tutorials, so thanks for all.
