Package Commands
Package management has two paths: Conda packages and PyPI packages. Prefer conda install; fall back to pip install when absent.
Install packages
Via Conda (searches configured channels):
conda install numpyconda install -n myenv pandas=2.2 # specific env, specific versionconda install -c conda-forge pytorch # specific channelVia pip inside a Conda env (after conda activate):
pip install requests⚠️ Mixing rule: use
conda installfor packages with binary deps (e.g.numpy,pytorch,opencv), thenpipfor pure-Python ones. Avoidcondaandpipcross-uninstalling the same package.
List installed packages
conda list # current envconda list -n myenv # specific envUpdate / remove
conda update numpy # update oneconda update --all # update all in current envconda remove numpy # remove (conda-installed)pip uninstall requests # remove (pip-installed)Search
conda search "numpy>=1.26"Clean cache
Conda caches downloaded packages. Clean periodically:
conda clean -a -y # clean all caches⚠️
conda clean -adeletes all download caches; next install re-downloads.