-
Installation and Setup
-
Install Conda: Follow the instructions on the official website
-
Update Conda:
conda update conda
-
-
Managing Environments
-
Create a new environment:
conda create --name myenv
-
Activate an environment:
conda activate myenv
-
Deactivate an environment:
conda deactivate
-
List all environments:
conda env list
-
Remove an environment:
conda env remove --name myenv
-
-
Managing Packages
-
Install a package:
conda install package-name
-
Install specific version of a package:
conda install package-name=version
-
Update a package:
conda update package-name
-
Uninstall a package:
conda remove package-name
-
List installed packages:
conda list
-
-
Searching Packages
-
Search for a package:
conda search package-name
-
-
Working with Channels
-
Add a channel:
conda config --add channels channel-name
-
List channels:
conda config --show channels
-
Remove a channel:
conda config --remove channels channel-name
-
-
Exporting and Importing Environments
-
Export environment to a YAML file:
conda env export > environment.yml
-
Create an environment from a YAML file:
conda env create -f environment.yml
-
-
Miscellaneous Commands
-
Check Conda version:
conda --version
-
List Conda commands:
conda --help
-
Tips
-
Always activate the relevant environment before installing or updating packages to ensure they are placed in the correct environment.
-
Regularly update Conda and packages to get the latest features and security updates.
-
Use YAML files for environment management to ensure consistency across different machines or deployments.