I have managed to locally install a latest Julia (version 1.5.2) locally on an Ubuntu SuperComputer into a folder I created called Julia_folder . I am able to use Julia within this folder. But my challenge is the system full path is still set to the old version 0.4.5 bin. I added my local Julia directory to my .bashrc file to manually change the default path using:
and applied the source .bashrc afterwards. But the path is still the old version 0.4.5 bin, and thus, my manually settings still didn’t work. How can I manually change the path to use the latest Julia version 1.5.2 instead of the old version 0.4.5 which was already installed in this Ubuntu Supercomputer? Please, I need assistance with this. Thanks in advance
Directories in the PATH are searched in order as they appear in the environment variable. If you want that /path/to/home/clement/Julia_folder/julia-1.5.2/bin has higher precedence over the rest of the PATH you have to prepend it, instead of appending it:
I am technically calling Julia in R via Ubuntu command line, but it couldn’t accept the JuliaCall since the version of Julia was an old one (v 0.4.5). So I installed a new version locally into a a new folder called Julia_folder. So my main goal is to be able to set the default Julia path to the new Julia version within my Julia_folder.
Where are you setting the variable exactly and how? To make the change effective you need to re-evaluate the setting of the variable. If you put it in your shell init script you need either to reload it, or simply to open a new shell
There are two ways I can think of. The easiest one for long term stability of your Julia usage would be to edit your ~/.bashrc so that PATH is set the way that you want it, then start a new shell session.
The other way is to put something like the following into a text file (let’s call it fixpath):
I haven’t had time to read the whole thread, sorry.
One thing to watch - if you are running a job on a compute node there is a difference between interactive and non-interactive shells. It can cuase problems like this.
HOWEVER your .bashrc file should be sourced so you should pick up the correct PATH
I now ask - is the MODULES environment installed on your HPC cluster?
Please send the output of module whatis
If modules are installed you can create a personal one in your own directory for Julia.
Thank you all for the great advice and assistance earlier today. My problem has been solved now. The .bash_profile shell script was the cause of the problem. I only needed to delete the .bash_profile shell script to save the day. Cheers. Now the new Julia version is set as the default path now as shown below: