![]() Note, this is likely an experimental feature, so this may not be appropriate in production until official adoption into the public API. See the equivalent command below: # Equivalent The latter command is effective at running commands in environments without the activation/deactivation steps. Λ conda run -name myenv conda list -explicit > spec_file.txt There appears to be an undocumented conda run option to help execute commands in specific environments. Newer versions of conda can use conda activate (this may require some setup with your shell configuration via conda init). With older conda versions use activate (Windows) and source activate (Linux/Mac OS). Anaconada Navigator desktop program for a more graphical experience.conda env for more details on the env sub-commands.Λ conda install -name root -file spec_file.txtĪlternatively, replicate a new environment (recommended): λ conda create -name myenv2 -file spec_file.txt Make a spec-file ++ to append dependencies from an env (see λ activate myenv This basically creates a direct copy of an environment. ![]() Use the -clone flag to clone environments (see post): λ conda create -name myclone -clone root root) with the yaml file: λ conda env update -name root -file environment.yml ![]() Then update the first environment + (e.g. myenv), export names + to a yaml file: λ activate myenv Λ conda list -explicit > spec_file_root.txt Λ conda env export > environment_root.yml To backup your root env for example: λ conda activate root Verify the desired outcome by testing these commands in a demo environment. However, consider backing up your existing environments before attempting changes. Normally it is safer to work from a new environment rather than changing root. There are options to copy dependency names/urls/versions to files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |