Multiple GMT versions on a Mac

I’m using GMT for many years, one version at a time, using bash scripts. It works fine setting on the root folder /Applications and then setting my bash_profile with : PATH=/Applications/$PATH.
As I have a lot of scripts for GMT5, I want to try GMT6 beside GMT5. So I install both versions in Applications folder and try to install a switch mode with gmtswitch. But gmtswitch doesn’t found any version of GMT. If I set manually a .gmtversions file with the two, type gmtswitch in a terminal windows and select one of them, it is said that the GMT version is not found.
Should I install GMT in the ~/Users/myname/Applications folder instead of /Applications ? Or what else can be wrong ?
Thanks for help.

I just installed from the macOS bundle and added /Applications/ to my ~/.gmtversions file and have no problem switching back and forth. And you have added #HOME/this_gmt/bin to your $PATH, correct?

I thinks that’s the problem but I don’t really understand the use of #HOME/this_gmt/bin.

In my .bash_profile file, I have just set :
export PATH=/Applications/$PATH
and so, with only one GMT version (and not any ~/.gmtversions file), GMT5 works fine.
Should I create a .gmtversions file and write instead
export PATH= #HOME/this_gmt/bin:$PATH
in my .bash_profile ?

Sorry $HOME (my typo). But yes, you need to add $HOME/this_gmt/bin to your PATH, presumable up front as you indicated.
Since GMT6 is meant to be fully compatible with GMT5 and fixes a bunch of bugs, I am not sure it is a good idea to use GMT5 anyway though.

Thanks a lot. Then it works. I’ve created a .gmtversions file with the correct paths to /Applications/, added “export PATH= $HOME/this_gmt/bin:$PATH” to my .bash_profile file and I have compiled some old scripts with GMT6 without apparent problems.
Indeed, using both GMT5 and GMT6 seems useless. Furthermore, GMT6 seems to work quite quicker than GMT5.