If you’re using the nf-core pipeline template, you might find that nextflow.config
is setting an environment variable PYTHONNOUSERSITE = 1
which we added for exactly this reason - to prevent the user’s Python libraries getting into the container run time.
Otherwise it could be down to what directories are mounted (including the home directory).