Debian/Ubuntu users: where do you install julia's?

I’m on Windows, but experimenting with running Julia (and jupyter / IJulia) from WSL2 (windows subsystem for linux), in the hopes of speeding up startup latency times.[1]

I’m not an experienced Linux user, and Platform Specific Instructions for Official Binaries does not give any opinion on where to download and install.

After googling, and browsing man hier, I’m considering

/usr/local/julia-1.6.7
/usr/local/julia-1.8.5
/usr/local/julia-1.9.0-beta3

etc.

What do others do?
Do you do the wgets and tar zxvfs and rm -rf’s and path manipulation for julia version mgmt, or do you use some tool?


  1. See e.g. Package load speed: Windows vs Linux
    and Loading is 10x slower under Windows than WSL on the same machine · Issue #40570 · JuliaLang/julia · GitHub linked therein. ↩︎

On my personal machines, I just untar into a directory within my home directory and then make symbolic links to the julia executable, e.g.

cd ~/packages
tar xvfpz julia-1.8.5-linux-x86_64.tar.gz
cd ~/bin
rm julia
ln -s ~/packages/julia-1.8.5/bin/julia julia-1.8.5
ln -s julia-1.8.5 julia

I have ~/bin in my PATH so that executing julia from the command line starts the most recent julia version, and prior versions are still accessible by calling, say, julia-1.8.3.

Doing this without root privileges is easier and safer.

4 Likes

I use Gnu Stow. I extract the julia tar file in /usr/local/stow and then stow creates the necessary symlinks to install everything. Installing in /usr/local does require root access, if you don’t have that you could use a subdirectory of $HOME for your stow and target directories.

curl https://julialang-s3.julialang.org/bin/linux/x64/1.8/julia-1.8.4-linux-x86_64.tar.gz -o - \
    | sudo tar -C /usr/local/stow -xzf-

# remove the symlinks to the previous version
sudo stow -Dd /usr/local/stow julia-1.8.3
# Install the new symlinks
sudo stow -d /usr/local/stow julia-1.8.4

Thank you, those are both great suggestions!

On root access and

I’m currently root, as it’s a VM anyway so I’m not afraid of bricking something; and I remember lots of software being hard to install if you weren’t root.

Have you ever been saved by not having root privileges?

juliaup is a great way to install and manage multiple Julia versions.

4 Likes

Great, that’s exactly what I was looking for :slight_smile:

I now notice it’s also mentioned at the bottom of

(though it only mentions it for the Windows Store; made a PR to fix.
/downloads/platform: juliaup is not just for Windows by tfiers · Pull Request #1812 · JuliaLang/www.julialang.org · GitHub)

Why not use Docker and simply spin up a container from my JupyterLab Julia docker stack.
→ Multi-arch (linux/amd64 , linux/arm64/v8 ) docker images based on Debian including Julia, JupyterHub, JupyterLab, code-server (aka VS Code), Git, Git LFS, Pandoc, Zsh plus several popular VS Code extensions.

These images have Julia installed at /opt/julia. For Julia versions 1.9 and later, Julia will be installed at /usr/local/julia.

See also JupyterLab + code-server + Julia

That’s cool!
IME Docker is slower than WSL2 (plus less interactivity with the OS etc)

EDIT: in terms of startup latency I mean

Love that TinyTeX is installed :slight_smile:

1 Like

with respect to Julia, no, but in general yes, many times. My root prompt is root# in bright red, and it reminds me to be extra careful about moving and removing things. And Julia works just fine when installed not as root.

3 Likes

I prefer GitHub - johnnychen94/jill.py: A cross-platform installer for the Julia programming language . In contrast to JuliaUp new versions are available faster.

pip3 install jill
jill install 1.8

You want to try the newest beta:

jill install 1.9 --unstable
jill switch 1.9

You can easily use different Julia versions per project.

2 Likes