Re: [Lmod-users] Difference between bash and cshell for source_sh
A Lua based environment module system that reads TCL modulefiles.
Brought to you by:
rtmclay
|
From: Robert M. <rt...@gm...> - 2026-03-18 17:08:39
|
Since you have not received a response, it would seem that no one else has
solved the problem either.
Please create an issue at github with this. In this issue please report
what the output of the following is:
bash> $LMOD_CMD csh load conda 2>&1 > conda_load.log
bash> $LMOD_CMD csh load conda_env 2>&1 > conda_env_load.log
bash> $LMOD_CMD csh load conda conda_env 2>&1 > big_conda_load.log
Please attach the above three log files to the github issue.
Thanks,
Robert.
On Mon, Mar 16, 2026 at 10:56 AM Jakob Stierhof <jak...@fa...>
wrote:
> Dear Lmod users,
>
> at our site we provide the users with a conda installation via lmod.
> While this works fine, we also have some locally compiled code that
> depends on python and we use conda environments for it. We managed to
> activate and deactivate a specific conda env via a module file doing
> nothing else other than having a `execute{cmd='conda activate {env}',
> modeA={'load'}}` and correspondingly for unload.
>
> This works as expected in the shell (provided the conda module is loaded
> and not requiested via, e.g., `depends_on`, i.e., set as `prereq`).
> However, when the module for the conda environment is used in another
> module file it does work as expected using bash, but it fails for cshell.
>
> The problem is not because of lmod, but because how conda initializes
> for bash or cshell. In the latter case the `conda activate` throws an
> error `CondaError: Run 'conda init' before 'conda activate`. I suspect
> that the way how lmod modifies the environment interferes with how conda
> wants it to be when running.
>
> So, in short:
>
> cshell> module load conda
> cshell> module load conda_env
>
> works, while
>
> cshell> module load conda conda_env
>
> does not.
>
> For bash, both work just fine.
>
> I was wondering if someone tried to solve a similar issue and came up
> with a good solution.
>
> Thanks!
> Jakob
>
>
>
> _______________________________________________
> Lmod-users mailing list
> Lmo...@li...
> https://lists.sourceforge.net/lists/listinfo/lmod-users
>
|