Skip to content
Julia setup

Julia setup

Install Julia

Install Julia with the juliaup installer.

Linux/MacOS

curl -fsSL https://install.julialang.org | sh -s -- -y

Windows

winget install julia -s msstore

Alternatively, download and install Julia official binaries.

Post-install configurations

Auto-activate local projects

Set environment variable JULIA_PROJECT=@. to let Julia automatically load the closest upstream Project.toml and activate the environment.

~/.profile
export JULIA_PROJECT=@.

Note

IJulia.jl, the Julia kernel for Jupyter notebooks, sets JULIA_PROJECT=@. by default. Thus, Jupyter notebooks load their local Julia environments automatically.

Warning

Loading local environments unconditionally is unsafe for untrusted sources, as shown in Nefarious.jl. That is why Julia does not run julia --project=@. by default.

Fully utilize CPU threads

Set environment variable JULIA_NUM_THREADS=auto to let Julia utilize all CPU threads.

~/.profile
export JULIA_NUM_THREADS=auto

Run Python packages

Install Python dependencies into a common environment in ~/.julia/conda_environments/mpl.

~/.profile
export JULIA_CONDAPKG_ENV="@mpl"
Last updated on