Skip to content

JULIA

You can use julia by loading the module

module load julia

Use a module in julia

To use a module in julia you can do:

using JSON

Add packages

To add packages to julia:

using Pkg
Pkg.add("JuMP")

To check the status and see what's installed

Pkg.status()

Virtual environments

When you're in your project directory, you can activate a virtual environment by using the --project option.

julia --project=.

When you install packages, they'll be available only in this environment.

You can create other environments in the same directory if you need to test multiple scenarios for example.

julia --project=env1

You can also create environments and install packages from the Pkg mode in julia by pressing the "]" key. You can exit that mode with the backspace key.

(@v1.7) pkg> activate env1
(env1) pkg> add JSON