0

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!

2

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.

  • Thanks! I think that is exactly what I needed! I had to rename the respective app in the terminal because the finder doesn't have that option for some reason...Im wondering what the .app signifies because it seems like its just any other directory in terms of specifying a path – Dipole Oct 22 '16 at 14:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .