Last active
April 16, 2025 16:58
-
-
Save simonespa/d6569699453e650f00a6183191809399 to your computer and use it in GitHub Desktop.
Conda
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## 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