Skip to content
Julia setup

Julia setup

Install Julia

Using the juliaup installer.

Linux/MacOS

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

Windows

winget install julia -s msstore

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 do 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

You can install Python dependencies into a common environment in ~/.julia/conda_environments/mpl by setting the following environment variable.

~/.profile
export JULIA_CONDAPKG_ENV="@mpl"

Persistent session

Using JuliaDaemon.jl to keep persistent Julia sessions to avoid package load and JIT compile latency. Useful for AI agents.

You might need to add ~/.julia/bin to your PATH:

~/.profile
# set PATH so it includes Julia APPs if it exists
if [ -d "$HOME/.julia/bin" ] ; then
    PATH="$HOME/.julia/bin:$PATH"
fi

To install it as a Pkg app and register the agent skill:

In Julia session:

pkg> app add https://github.com/KristofferC/JuliaDaemon.jl

In bash/zsh, run

$jld install

Then AI agent will read the skill and use jld to run Julia scripts.

See also

  • Kaimon.jl for more sophisticated Julia MCP tools (code execution, introspection, debugging, testing, and semantic search).
Last updated on