conda-{activate, clean, compare}: add page. conda-create: add prefix … (#18051)

Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>
Co-authored-by: Dylan <145150333+dmmqz@users.noreply.github.com>
This commit is contained in:
oleksii-kulyk
2025-09-16 18:25:29 -07:00
committed by GitHub
parent cf6be72e38
commit 9b1b8fe288
4 changed files with 87 additions and 6 deletions
+25
View File
@@ -0,0 +1,25 @@
# conda activate
> Activate a conda environment.
> See also: `conda deactivate` to deactivate a conda environment.
> More information: <https://docs.conda.io/projects/conda/en/stable/dev-guide/deep-dives/activation.html>.
- Activate an existing environment named `myenv`:
`conda activate myenv`
- Activate an existing environment located at custom path:
`conda activate {{path/to/myenv}}`
- Stack `myenv` environment on top of a previous environment making libraries/commands/variables from both accessible:
`conda activate --stack myenv`
- Start a clean environment `myenv` without stacking it making previous environment libraries/commands/variables not accessible:
`conda activate --no-stack myenv`
- Display help:
`conda activate {{[-h|--help]}}`
+28
View File
@@ -0,0 +1,28 @@
# conda clean
> Delete temporary or unused files: index cache, lock files, unused cache packages, tarballs, and log files.
> More information: <https://docs.conda.io/projects/conda/en/stable/commands/clean.html>.
- Delete all temporary or unused files verbosely and say yes to all confirmations:
`conda clean {{[-avy|--all --verbose --yes]}}`
- Delete only index cache, tarballs, and log files:
`conda clean {{[-itl|--index-cache --tarballs --logfiles]}}`
- Delete only temporary [c]ache files that could not be deleted earlier due to being in use:
`conda clean {{[-c|--tempfiles]}} {{path/to/tempfiles}}`
- Delete only unused packages. Might delete packages installed with softlinks:
`conda clean {{[-p|--packages]}}`
- Force delete all writable packages. More broad than the `--all` option. Will delete packages installed with softlinks:
`conda clean {{[-f|--force-pkgs-dirs]}}`
- Display help:
`conda clean {{[-h|--help]}}`
+20
View File
@@ -0,0 +1,20 @@
# conda compare
> Compare packages between conda environments.
> More information: <https://docs.conda.io/projects/conda/en/stable/commands/compare.html>.
- Compare packages in the current directory to packages from the file `file.yml`:
`conda compare file.yml`
- Compare packages in environment named `myenv` to packages from the file `file.yml`:
`conda compare {{[-n|--name]}} myenv {{path/to/file.yml}}`
- Compare packages in environment `myenv` at custom path (i.e. prefix) to packages from the file `file.yml`:
`conda compare {{[-p|--prefix]}} {{path/to/myenv}} {{path/to/file.yml}}`
- Display help:
`conda create {{[-h|--help]}}`
+14 -6
View File
@@ -3,14 +3,22 @@
> Create new conda environments.
> More information: <https://docs.conda.io/projects/conda/en/latest/commands/create.html>.
- Create a new environment named `py39`, and install Python 3.9 and NumPy v1.11 or above in it:
- Create a new environment named `py39`, install Python 3.9, NumPy v1.11 or above in it, and the latest stable version of SciPy. Say yes to all confirmations:
`conda create {{[-y|--yes]}} {{[-n|--name]}} {{py39}} python={{3.9}} "{{numpy>=1.11}}"`
`conda create {{[-ny|--name --yes]}} {{py39}} python={{3.9}} "{{numpy>=1.11 scipy}}"`
- Make exact copy of an environment:
- Create a new environment named `myenv` and install packages listed in files:
`conda create --clone {{py39}} {{[-n|--name]}} {{py39-copy}}`
`conda create {{[-n|--name]}} myenv --file {{file1.yml}} --file {{file2.yml}}`
- Create a new environment with a specified name and install a given package:
- Create a new environment named `myenv` at custom path (i.e. prefix):
`conda create {{[-n|--name]}} {{env_name}} {{package}}`
`conda create {{[-p|--prefix]}} {{path/to/myenv}}`
- Make exact copy of an environment named `py39`:
`conda create --clone py39 {{[-n|--name]}} {{py39-copy}}`
- Display help:
`conda create {{[-h|--help]}}`