Closed cefect closed 2 weeks ago
What if you remove name: testenv
from the environment.yml
or keep it and use mamba create --file ./test.yml
instead?
mamba create --file ./test.yml
gives the following error:
mamba create: error: one of the arguments -n/--name -p/--prefix is required
removing the names
field just pushes the parse error down to the channels
field. I've tried lots tweaking spacing and line endings, also with no effect.
Thank you for your insights and ideas
Is this error >>>could not parse 'name: testenv' in: ./test.yml
coming from Conda?
Can you try with mamba env create -n testenv --file ./test.yml
?
The error is the result of my mamba call, but difficult for me to tell what is causing it:
mamba create -n testenv --file ./test.yml
could not parse '- conda-forge' in: ./test.yml
CondaValueError: could not parse '- conda-forge' in: ./test.yml
Your suggestion (mamba env create
) works. Does this still use mamba's backends? I can't tell from my test case if its any faster. Am I misunderstanding the documentation?
mamba create -h
--file FILE Read package versions from the given file. Repeated file specifications can be passed (e.g.
--file=file1 --file=file2).
CondaValueError:
So yes the error is coming from conda
.
Mamba 1.x (your version is 1.5.8
) is using conda
behind the scenes, but micromamba
on the other hand, is completely independent from it and is a single executable cf. https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html
.
There is mamba 2.0
coming up soon, which is completely independent from conda
as well. And there, mamba
and micromamba
would have the same backends but only linked differently (dynamically for mamba
and statistically for micromamba
).
There is a beta3
for mamba/micromamba 2.0
available on conda-forge
if you would like to try it out!
As for the documentation, I agree that's unclear (mamba
is using conda
's doc as well) and it can be confusing as mamba/conda create -h
is suggesting to use the --file
flag but is actually using it in the given examples in env create -h
. I would suggest that everything related to environment management would be env subcommand
instead of command
.
Thank you for the fast and detailed response. Looking forward to 2.0!
Troubleshooting docs
Anaconda default channels
How did you install Mamba?
Mambaforge or latest Miniforge
Search tried in issue tracker
yes
Latest version of Mamba
Tried in Conda?
I do not have this problem with Conda, just with Mamba
Describe your issue
unable to parse a yaml spec file:
Works fine in conda. tried re-installing conda/mamba from miniforge, tried updating, different yaml files, different line endings, re-creating the yaml file... no luck. However, I'm new to mamba so I suspect there is something obvious I'm missing.
mamba info / micromamba info
Logs
No response
environment.yml
~/.condarc
No response