Skip to content

Instantly share code, notes, and snippets.

@elutins
Last active November 24, 2025 20:09
Show Gist options
  • Select an option

  • Save elutins/dbc4346c48cf6c70eae206c84f159773 to your computer and use it in GitHub Desktop.

Select an option

Save elutins/dbc4346c48cf6c70eae206c84f159773 to your computer and use it in GitHub Desktop.
using_conda.md
### Environment Creation
```zsh
# create conda env with a name of `conda_env_1` with specific python version
conda create -y --name conda_env_1 python=X.Y
# if you have a packages specified in a .yml file, can create a conda env with those packages
conda env create -f path/to/conda.yml
# if you have an explicit conda environment - explicit files contains URLs of the package tarballs.
# You can use this to install packages in a way that bypasses the conda dependency/resolution solver altogether
conda install -y --name conda_env_1 --file clv_dev_base_env-explicit.txt
```
### Environment Deletion
```zsh
conda env remove --name <environment_name>
```
### Common Commands
Using `mamba` instead of `conda` in some of the following commands. Have found `mamba` to be a much faster resolver and works for most projects/use cases.
```zsh
# installing `jupyter_console` package from the `conda-forge` channel
mamba install -c conda-forge jupyter_console
# updating a package
mamba update package_name
# list all packages installed in current environment
conda list
# list all packages matching a specific string pattern
conda list some_string
# list all conda environments installed on the machine
conda env list
# export current conda env to a file
conda env export path/to/file
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment