How to use different versions of paraview python? Paraview comes with a python called pvpython that I wish to use from the command line. Currently I have version 4.4 installed and to make it available I have added the following into my ~/.bashrc file:

export PATH=$PATH:/Applications/paraview.app/Contents/bin/

This allows my to type pvpython at the command line. But I now want to upgrade my Paraview to version 5.0 but still retain the old version. What is the best way to do this? If I download the new version of paraview I just get a package manager that I think will overwrite my old version (I just have /Applications/paraview.app but no version!) - but I want to be able to switch between the two versions whenever I want! Any suggestions would be helpful!
I would rename the old paraview.app to  paraview4.app and the new one to  paraview5.app.

Instead of exporting a path, create two aliases in ~/.bash_profile (and/or ~/.bashrc - it depends on if one sources the other)

alias pvpython4='/Applications/paraview4.app/Contents/bin/pvpython'
alias pvpython5='/Applications/paraview5.app/Contents/bin/pvpython'


If pvpython4/5 rely on the paths to /Applications/paraview*.app/Contents/bin/ I would choose a function which sets the path and calls the right binary.