I would like to create a conda environment based on an environment file in a certain path, using no symlinks. Therefore, I would like to run the following conda command:
conda create --file environment.yml --prefix ./python --copy
the file environment.yml
looks like this (I shortened it):
name: null
channels:
- defaults
dependencies:
- python==3.7.0
However, I get the following error:
CondaValueError: could not parse 'name: null' in: environment.yml
The following command works:
conda env create --file environment.yml --prefix ./python
However, then I cannot use the --copy
parameter:
error: unrecognized arguments: --copy
While I agree that there really should be an option for this, you can temporarily set the copy_always
configuration option to true while you run the command and that should do the trick:
CONDA_COPY_ALWAYS=1 conda env create --file environment.yml --prefix ./python
To verify, I created two versions of the same env with and without CONDA_COPY_ALWAYS=1
. They both come out as 969 MB in du
alone, but only the one without the CONDA_COPY_ALWAYS=1
gets reduced when including miniconda3/pkgs
in the du
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With