Skip to content

Conversation

@stefanhahmann
Copy link
Contributor

This PR adds the flag "--no-condarc" to create environment command.

Reasoning:

When testing code that contained setting up a python env using a yml file on user machines, it turned out that, if the user had an installation on his machine, it could happen that the already existing global settings from that installation were used.
In that particular case, this lead to the defaults channel being given priority, which was blocked by the institute where he is working, even though this channel was not at all referenced in the yml file.
In order to avoid such unexpected situations, where already existing installations influence what happens during the set up of an environment, I suggest to add the "--no-condarc" flag to the creation of a new environment.

Alternatively, one could instead add the "--override-channels" flag.

@ctrueden ctrueden merged commit d2950db into apposed:main Jun 26, 2025
3 checks passed
@ctrueden
Copy link
Member

Fully agreed, thanks!

@ctrueden
Copy link
Member

ctrueden commented Jun 27, 2025

My micromamba does not have a --no-condarc argument. I saw the following error when testing:

The following argument was not expected: --no-condarc

But I see:

$ ~/.local/share/appose/micromamba/bin/micromamba --help | grep rc | grep config
          --no-rc             Disable the use of configuration files 

I'm stumped why the CI didn't catch this, but I'm fixing it now.

@stefanhahmann
Copy link
Contributor Author

My micromamba does not have a --no-condarc argument. I saw the following error when testing:

But I see:

$ ~/.local/share/appose/micromamba/bin/micromamba --help | grep rc | grep config
          --no-rc             Disable the use of configuration files 

Yes, --no-rc should be the correct param. I took --no-condarc from the conda docs and did not double check, if the param actually exists. Sorry about that.

I'm stumped why the CI didn't catch this, but I'm fixing it now.

This is indeed strange. At least a found a hole in the CI tests with this wrong param..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants