Is it possible to keep operational GMT4 - GMT5 and GMT6 at the same time?

Hi there,
I am working on MAC, currently using both GMT4 and GMT5 (a legacy from working on different projects in different labs with different equipments over the years…). I am using GMT4 with ‘psxy…’ and GMT5 with ‘gmt psxy …’ , without using gmtswitch. The reason is also that, because I can’t find the location of …/gmt5/bin (I guess it may be because I installed GMT5 with macport…), which is apparently required for the .gmtversions.
Anyway, so far so good, it works just fine like that… but I’d like to move forward and install GMT6.
I guess the final goal is to converge eventually toward using a unique version, but during the transition period, I’d like to keep GMT4 and GMT5 functional.
Is there a way, and if so, what is the best solution to do that ?

Thank you very much in advance for your help,
Cheers

Emilie

Please see https://docs.generic-mapping-tools.org/6.1/switching.html for switching and how to deal with the missing “gmt” in ancient scripts. And if you are able to run your GMT5 version then “which gmt” should tell you what path that is, no?

Thank you for your answer.
That’s one of the first things I tried, but it actually does not. I think I installed gmt4 and gmt5 different ways. For gmt4, I find the folder /opt/local/lib/gmt4 where are all the modules and everything, fine. But I can’t find them for gmt5. Even a ‘locate psxy’ send only the gmt4 module.

Nevertheless, I tried to “fix” all that using macport, and it looks like I succeeded so if can be of use for anybody, here is what I did:

I first made some port updates (was a long time) : ‘port selfupdate’. Then upgrade of all installed packages with ‘port upgrade outdated’. After that, I checked that both gmt4 and gmt5 were installed using ‘port installed’. All of this made some changes in the way both versions can be used:

  • gmt4 is still working with ‘psxy’
  • gmt5 is working using ‘gmt5 psxy’
    At this point, I tried to install gmt6 (with macport as well) which apparently worked and now I can call the modules using ‘gmt6 psxy’.
    The 3 versions seem active and operational so I “just” have to learn how to use gmt6 …!