-
Notifications
You must be signed in to change notification settings - Fork 46
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
No prefix found at: /opt/conda/envs/... #136
Comments
Hi @andreas-wilm - thank you for your interest in micromamba. I can reproduce that $ docker run -it --rm -v $(pwd):/tmp mambaorg/micromamba:0.21.2 micromamba list
info ****************** Backtrace Start ******************
debug Loading configuration
trace Compute configurable 'create_base'
trace Compute configurable 'no_env'
trace Compute configurable 'no_rc'
trace Compute configurable 'rc_files'
trace Compute configurable 'root_prefix'
trace Get RC files configuration from locations up to HomeDir
trace Configuration not found at '/home/mambauser/.mambarc'
trace Configuration not found at '/home/mambauser/.condarc'
trace Configuration not found at '/home/mambauser/.conda/condarc.d'
trace Configuration not found at '/home/mambauser/.conda/condarc'
trace Configuration not found at '/home/mambauser/.conda/.condarc'
trace Configuration not found at '/opt/conda/.mambarc'
trace Configuration not found at '/opt/conda/condarc.d'
trace Configuration not found at '/opt/conda/condarc'
trace Configuration not found at '/opt/conda/.condarc'
trace Configuration not found at '/var/lib/conda/.mambarc'
trace Configuration not found at '/var/lib/conda/condarc.d/'
trace Configuration not found at '/var/lib/conda/condarc'
trace Configuration not found at '/var/lib/conda/.condarc'
trace Configuration not found at '/etc/conda/.mambarc'
trace Configuration not found at '/etc/conda/condarc.d/'
trace Configuration not found at '/etc/conda/condarc'
trace Configuration not found at '/etc/conda/.condarc'
trace Update configurable 'no_env'
trace Compute configurable 'file_specs'
trace Compute configurable 'spec_file_env_name'
trace Compute configurable 'env_name'
trace Compute configurable 'envs_dirs'
trace Compute configurable 'use_target_prefix_fallback'
trace Compute configurable 'target_prefix'
trace Get RC files configuration from locations up to TargetPrefix
trace Configuration not found at '/opt/conda/.mambarc'
trace Configuration not found at '/opt/conda/condarc.d'
trace Configuration not found at '/opt/conda/condarc'
trace Configuration not found at '/opt/conda/.condarc'
trace Configuration not found at '/home/mambauser/.mambarc'
trace Configuration not found at '/home/mambauser/.condarc'
trace Configuration not found at '/home/mambauser/.conda/condarc.d'
trace Configuration not found at '/home/mambauser/.conda/condarc'
trace Configuration not found at '/home/mambauser/.conda/.condarc'
trace Configuration not found at '/opt/conda/.mambarc'
trace Configuration not found at '/opt/conda/condarc.d'
trace Configuration not found at '/opt/conda/condarc'
trace Configuration not found at '/opt/conda/.condarc'
trace Configuration not found at '/var/lib/conda/.mambarc'
trace Configuration not found at '/var/lib/conda/condarc.d/'
trace Configuration not found at '/var/lib/conda/condarc'
trace Configuration not found at '/var/lib/conda/.condarc'
trace Configuration not found at '/etc/conda/.mambarc'
trace Configuration not found at '/etc/conda/condarc.d/'
trace Configuration not found at '/etc/conda/condarc'
trace Configuration not found at '/etc/conda/.condarc'
trace Update configurable 'no_env'
trace Compute configurable 'target_prefix_checks'
error Expected environment not found at prefix: /opt/conda
critical Aborting.
info ****************** Backtrace End ********************
$ But I'm not able to reproduce an error with Does the following work for you? $ cat > env.yml << EOF
name: base
channels:
- conda-forge
dependencies:
- jq=1.6
EOF
$ docker run -it --rm -v $(pwd):/tmp mambaorg/micromamba:0.21.2 micromamba install -y -f /tmp/env.yml If you can post a minimal example with your failing Dockerfile, that would be helpful. Are you running on x86 hardware? The arm64 and ppc64le images have seen little use and are not as well tested. |
Wow. This is the fastest Github response I've ever seen. Thanks so much. I'm on an Intel Mac. But turns out the architecture is not the problem, because your simple env.yml file worked flawlessly. I just tried a bit more and it turns out the a hyphen in the environment Apologies. And thank you so much for getting me on the right track |
I'm guessing you had something like this: $ cat > env.yml << EOF
name: MyEnv
channels:
- conda-forge
dependencies:
- jq=1.6
EOF
$ docker run -it --rm -v $(pwd):/tmp mambaorg/micromamba:0.21.2 micromamba install -y -f /tmp/env.yml This does not work because the $ cat > env.yml << EOF
name: MyEnv
channels:
- conda-forge
dependencies:
- jq=1.6
EOF
$ docker run -it --rm -v $(pwd):/tmp mambaorg/micromamba:0.21.2 micromamba create -y -f /tmp/env.yml This form creates the new environment before installing the packages. Hyphens should work in environment names. |
Oh my God. You are right. The hyphen was a red herring, because I tried |
A few users have been tripped up when trying to install dependencies from environment files with specific environment names, which haven't been created. mamba-org#136 mamba-org#151 This tripped me up for a minute as well. My workflow is pretty much always to have an environment.yml file with a non-base `name` for local usage, but to install that environment as the `base` environment when creating a portable Docker image using micromamba. I suspect there are others out there doing the same. Adding `-n base` to the quick start install instructions both clarifies that we're installing to the base environment, and also allows installing into the base environment from environment files with embedded names by overriding the name.
Hi there,
Thanks for creating Micromamba and Micromamba Docker!
I followed the instructions to create a Dockerfile and no matter which version I use (0.21.2, 0.21.1, 0.19.0) I get:
when running
micromamba install -y -f /tmp/env.yml
. I also get this when I try to create an environment interactively.Likewise, if I run a plain
micromamba list
interactively, I get:I guess I must be doing something fundamentally wrong. Could someone please point the mistake out?
Many thanks,
Andreas
The text was updated successfully, but these errors were encountered: