Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| software:miniconda:caviness [2025-11-06 15:05] – [Installing Applications with Conda] thuachen | software:miniconda:caviness [2025-11-06 15:38] (current) – [Migrating Environments] thuachen | ||
|---|---|---|---|
| Line 24: | Line 24: | ||
| </ | </ | ||
| You can create a new Conda environment with a specific package and in a specific path. For example, to create an environment in a specific path, such as your ''/ | You can create a new Conda environment with a specific package and in a specific path. For example, to create an environment in a specific path, such as your ''/ | ||
| - | < | + | < |
| - | conda create -p / | + | [(my_workgroup: |
| </ | </ | ||
| Line 32: | Line 32: | ||
| </ | </ | ||
| After creating the Conda environments, | After creating the Conda environments, | ||
| - | < | + | < |
| - | conda activate myenv | + | [(my_workgroup: |
| </ | </ | ||
| You can install the desired packages in the current environment, | You can install the desired packages in the current environment, | ||
| - | < | + | < |
| - | (/ | + | (/ |
| </ | </ | ||
| To list packages in the currently active environment, | To list packages in the currently active environment, | ||
| - | < | + | < |
| - | conda list | + | (/ |
| + | # packages in environment at / | ||
| + | # | ||
| + | # Name Version | ||
| + | _libgcc_mutex | ||
| + | _openmp_mutex | ||
| + | absl-py | ||
| + | astunparse | ||
| + | bzip2 | ||
| + | ca-certificates | ||
| + | certifi | ||
| </ | </ | ||
| To deactivate the environment, | To deactivate the environment, | ||
| - | < | + | < |
| - | conda deactivate | + | (/ |
| + | [(my_workgroup: | ||
| </ | </ | ||
| To remove an environment, | To remove an environment, | ||
| - | < | + | < |
| - | conda remove -p </path/to/myenv> --all | + | [(my_workgroup: |
| </ | </ | ||
| + | To remove the unused packages and caches, do | ||
| + | <code bash> | ||
| + | [(my_workgroup: | ||
| + | </ | ||
| + | |||
| ===== Migrating Environments ===== | ===== Migrating Environments ===== | ||
| In the terminal window, to view the environments available to you, use | In the terminal window, to view the environments available to you, use | ||
| - | < | + | < |
| - | conda env list | + | [(my_workgroup: |
| + | # conda environments: | ||
| + | # | ||
| + | base / | ||
| + | */ | ||
| </ | </ | ||
| After activating the desired environment, | After activating the desired environment, | ||
| - | < | + | < |
| - | conda activate myenv | + | [(my_workgroup: |
| - | conda export --file=environment.yaml # Auto-detects YAML format | + | (/ |
| - | conda export | + | name: / |
| - | conda export --file=explicit.txt # Auto-detects explicit format | + | channels: |
| - | conda export | + | - conda-forge |
| + | dependencies: | ||
| + | | ||
| + | | ||
| + | - bzip2=1.0.8=hda65f42_8 | ||
| + | | ||
| + | - cuda-version=11.8=h70ddcb2_3 | ||
| + | | ||
| + | - cudnn=8.9.7.29=hbc23b4c_3 | ||
| + | ... | ||
| + | ... | ||
| + | |||
| + | prefix: / | ||
| </ | </ | ||
| - | Then you can create | + | Then you can duplicate |
| - | < | + | < |
| - | conda create -p myenv -f environment.yml | + | (/ |
| + | [(my_workgroup: | ||
| </ | </ | ||