How to switch between different versions of Julia (in particular, between v0.3 and v0.4 on Ubuntu)?

I am working on some projects using Julia v0.3. However, I would like to test my code in both v0.3 and v0.4 (since some of the people who will use it already use v0.4). I am running Ubuntu 14.04 and installed Julia using apt-get. I know that v0.4 is available through PPA julianightlies, but if I add this, v0.3 will be replaced. Is there a way to install and quickly switch between both versions for testing?

+7
linux ubuntu julia-lang
source share
2 answers

You can install different versions of Julia in different places and set separate symbolic links.

For example, you can download v0.3 Linux files and install them in one place, then clone the GitHub source for v0.4 and install it in another place. Then install symbolic links such as julia3 for v0.3 and julia4 for v0.4.

Run your code:

 $ julia3 somefile.jl $ julia4 somefile.jl 
+5
source share

Install by compiling and then change your action at the beginning of the file as

#!/path_to/julia3

or

#!/path_to/julia4

It will do the trick

+1
source share

All Articles