Skip to content

Error loading modules with variant path #43

@ScottWales

Description

@ScottWales

Loading the conda modules with

module use /g/data/hh5/public/modules/conda
module load analysis3-23.01

is failing without an error message due to how the module works out which environment to load at https://github.com/coecms/conda-envs/blob/analysis3/modules/.common.v2#L17. Users see e.g.

$ python -c 'import numpy'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'numpy'

A simple fix would be to add a test that [lindex [split [module-info name] {/}] 0] == 'conda' and fail with an error message if it does not, or you could change line 17 to get the last element of the list instead of the second element.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions