Skip to content

Instantly share code, notes, and snippets.

@simonespa
Last active April 16, 2025 16:58
Show Gist options
  • Select an option

  • Save simonespa/d6569699453e650f00a6183191809399 to your computer and use it in GitHub Desktop.

Select an option

Save simonespa/d6569699453e650f00a6183191809399 to your computer and use it in GitHub Desktop.
Conda
## To setup a project
# Create an empty environment specifying the Python version
conda create --name ml python=3.12
# Activate the environment
conda activate ml
# Add a new channel
conda config --env --add channels conda-forge
# Install a list of packages
conda install ...
# Install an environment from a YAML file
conda env create -f environment.yml
# Export the environment configuration to a YAML file
conda env export > environment.yml
## Other commands
# Update all packages in the environment
conda update --all
# List all the conda environment available
conda info --envs
# Create a new environment named "env"
conda create --name env
# Remove the "env" environment and all its dependencies
conda remove --name env --all
# Clone an existing environment
conda create --name env_clone --clone env
# Install a package from a different channel
conda install -c conda-forge ydata-profiling
# Config shell activation
conda config --set auto_activate_base false
# Reverse the shell config
conda init --reverse zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment