TITLE: <<<TITLE [AIGC] Miniconda Common Commands Cheat Sheet TITLE
TEXTMARKDOWN: <<<TEXTMARKDOWN Recently, I've been studying visual measurement and control, which requires Python. I used AI to generate some common commands for easy lookup.
Miniconda is a lightweight Conda installer. It contains Conda, Python, the packages they depend on, and a small number of other useful packages. This cheat sheet aims to help you quickly find and use the most core and common Miniconda commands.
Managing independent, isolated development environments is one of Conda's most powerful features.
Create an environment with a specific Python version:
myenv is your environment name, python=3.9 is the Python version you wish to install.
Create an empty environment with specific packages:
Fully clone an existing environment:
Activate environment (Windows):
Activate environment (macOS / Linux):
Or more universally:
Deactivate the current environment and return to the base environment:
List all created environments:
Or
The currently activated environment will have a * mark.
In an activated environment, you can easily manage software packages.
Install a package in the current environment:
Install multiple packages:
Install a specific version of a package:
Install a package from a specific channel (e.g., anaconda, conda-forge):
List all installed packages in the current environment:
Search for available package versions:
Update a single package in the current environment:
Update all updatable packages in the current environment:
Update Conda to the latest version:
Or a more concise command:
Check Conda version:
Or
Channels are remote repositories used by Conda to find and install packages.
View the list of currently configured channels:
Add a new channel (for example, add conda-forge and set it to highest priority):
Remove a specified channel:
Tip: Placing the most commonly used channels (such as conda-forge) above defaults can help you install more updated and comprehensive community-maintained packages. Using --add will add the new channel to the top of the list, giving it the highest priority.
TEXT_MARKDOWN