Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot disable defaults channel #3073

Closed
3 tasks done
jmakov opened this issue Dec 20, 2023 · 6 comments
Closed
3 tasks done

Cannot disable defaults channel #3073

jmakov opened this issue Dec 20, 2023 · 6 comments

Comments

@jmakov
Copy link

jmakov commented Dec 20, 2023

Troubleshooting docs

  • My problem is not solved in the Troubleshooting docs

Anaconda default channels

  • I do NOT use the Anaconda default channels (pkgs/* etc.)

How did you install Mamba?

Mambaforge or latest Miniforge

Search tried in issue tracker

defaults

Latest version of Mamba

  • My problem is not solved with the latest version

Tried in Conda?

Not applicable

Describe your issue

Wanted to disable defaults channel after install step in makefile. Copy pasting the command from the docs results in error. Also if it's not recommended, why isn't it disabled by default? mamba create --override-channels ... returns

usage: mamba create [-h] [--clone ENV] (-n ENVIRONMENT | -p PATH) [-c CHANNEL] [--use-local] [--override-channels] [--repodata-fn REPODATA_FNS] [--experimental {jlap,lock}] [--strict-channel-priority] [--no-channel-priority] [--no-deps | --only-deps] [--no-pin] [--copy] [-C] [-k] [--offline] [-d] [--json] [-q] [-v] [-y] [--download-only] [--show-channel-urls] [--file FILE] [--no-default-packages]
                    [--solver {classic,libmamba} | --experimental-solver {classic,libmamba}] [--dev]
                    [package_spec ...]
mamba create: error: one of the arguments -n/--name -p/--prefix is required

More info here: conda-forge/miniforge#542

mamba info / micromamba info

No response

Logs

No response

environment.yml

No response

~/.condarc

No response

@jonashaag
Copy link
Contributor

Thanks, I think it should have been mamba env create. Mind double
checking and sending a PR?

It is disabled by default in most installations, but it is a very common mistake people make and so it is documented very aggressively in the troubleshooting guide.

@jmakov
Copy link
Author

jmakov commented Dec 20, 2023

Oh, so I don't have to disable it manually.
Doesn't seem to work for me:

$ mamba env create --override-channels ...
usage: mamba [-h] {create,export,list,remove,update,config} ...
mamba: error: unrecognized arguments: --override-channels
$  mamba --version
mamba 1.4.2
conda 23.3.1

@jonashaag
Copy link
Contributor

I don't understand why you don't have the option. With Conda 23.10:

conda create --override-channels -p /tmp/x -c conda-forge

works

@AntoinePrv
Copy link
Member

@jmakov if you want to disable defaults channels alltogether, you can also add to your .condarc:

default_channels: []

@jmakov
Copy link
Author

jmakov commented Dec 26, 2023

Thanks. So to share my case - I'm installing mamba from a makefile and wanted to copy paste the command from the docs.

@jonashaag
Copy link
Contributor

It seems like the docs are invalid: conda/conda#10498

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

No branches or pull requests

3 participants