Page tree
Skip to end of metadata
Go to start of metadata


Error message "env: ‘singularity’: No such file or directory" after submitting an sbatch job script that includes Nextflow as an application. This message appears if you have set your nextflow.config file with individual SLURM parameters for each process, and some or all of the processes use Singularity containers. This also applies to any other container engines, as long as you have set SLURM parameters for each of the processes.


Get rid of module load singularity in the batch job script.

In substitution, edit the Nextflow configuration file, normally called nextflow.config, to load the Singularity module through Nextflow syntax:

process.module = 'singularity'

For a more comprehensive nextflow.config template for usage at Pawsey, see Nextflow.

Alternative solution

On the sbatch job script, add the line unset SBATCH_EXPORT before running Nextflow. The below is an example of submitting a job script for a Nextflow script to run:

#!/bin/bash -l

#SBATCH --partition=workq
#SBATCH --job-name=nextflow-example
#SBATCH --time=1:00:00
#SBATCH --export=NONE


module load nextflow
module load singularity

nextflow run -profile zeus