Skip to content

Install with pixi

Experimental

Installing with pixi is an experimental alternative to conda. It may change or be removed, and it is not yet recommended for new users: for a first install, follow the conda steps of the installation guide.

pixi builds the Python environment from the pixi.toml in the PROTEUS repository, so it replaces only the conda steps of the installation guide. Everything else is unchanged.

  1. Install the system packages as in step 1 of the installation guide, and install pixi.
  2. Install Julia as in step 2.
  3. Clone PROTEUS as in step 3; you do not need miniconda or miniforge.
  4. Run the installer through pixi instead of bash install.sh:

    pixi run bash install.sh
    

    pixi run creates the environment on first use, so there is no separate setup step.

pixi.toml sets JULIA_DEPOT_PATH to julia_depot in the pixi environment, so each clone keeps its own Julia packages and pixi run always uses them. This value replaces one set in your shell; to use another depot, change that line in pixi.toml. Deleting .pixi/ deletes the depot too.

The installer writes the environment variables (FWL_DATA, RAD_DIR, FC_DIR, PYTHON_JULIAPKG_EXE, JULIA_DEPOT_PATH) to .proteus-env.sh in the PROTEUS folder, not into the pixi environment. Load them in each new shell, then prefix commands with pixi run, or use pixi shell for an activated shell:

source .proteus-env.sh
pixi run proteus start --offline -c input/dummy.toml

The lock file

pixi.lock is not committed, so a fresh clone resolves against current packages. pixi writes one on first use and reuses it afterwards, so a later install in the same directory reproduces exactly what it records. Run pixi update to re-resolve to newer versions, or delete pixi.lock and .pixi/ to start from nothing.

Kapteyn

Kapteyn provides no netcdf-fortran (see the Kapteyn guide), so it has to come from the environment, together with a gfortran that can read its Fortran module files. The system gfortran is too old for the current conda-forge build:

pixi add netcdf-fortran gfortran

SOCRATES also needs the library directory on LD_LIBRARY_PATH at run time, so add this line under [activation.env] in pixi.toml:

LD_LIBRARY_PATH = "$CONDA_PREFIX/lib"

These are local edits to a tracked file. #886 looks into removing the need for the run-time path.