Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/conda/conda/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The conda install command installs a list of packages into a specified conda environment. It accepts package specifications (e.g., bitarray=0.8) and installs a set of packages consistent with those specifications and compatible with the underlying environment. Conda attempts to install the newest versions of the requested packages. To accomplish this, it may update some packages that are already installed, or install additional packages.

Syntax

conda install [options] [package_spec ...]

Target Environment Specification

-n, --name
string
Name of environment.
-p, --prefix
string
Full path to environment location (i.e. prefix).

Package Specifications

package_spec
string
List of packages to install or update in the conda environment. Package specifications can include:
  • Simple names: numpy
  • Version constraints: python=3.11, numpy>=1.20
  • Build specifications: numpy=1.20=py39_0
  • Explicit filenames: ./lxml-3.2.0-py27_0.tar.bz2
--file
string
Read package versions from the given file. Repeated file specifications can be passed (e.g. --file=file1 --file=file2).
--revision
string
Revert to the specified REVISION.

Solver Mode Modifiers

--freeze-installed, --no-update-deps
boolean
Do not update or change already-installed dependencies. This may force conda to install older versions of the requested packages.
--update-deps
boolean
Update dependencies that have available updates.
-S, --satisfied-skip-solve
boolean
Exit early and do not run the solver if the requested specs are satisfied. Also skips aggressive updates as configured by the aggressive_update_packages config setting.
--update-all, --all
boolean
Update all installed packages in the environment.
--update-specs
boolean
Update based on provided specifications.
--no-deps
boolean
Do not install, update, remove, or change dependencies. This WILL lead to broken environments and inconsistent behavior. Use at your own risk.
--only-deps
boolean
Only install dependencies.
--force-reinstall
boolean
Ensure that any user-requested package for the current operation is uninstalled and reinstalled, even if that package already exists in the environment.
--no-pin
boolean
Ignore pinned file.
--strict-channel-priority
boolean
Packages in lower priority channels are not considered if a package with the same name appears in a higher priority channel.
--no-channel-priority
boolean
Package version takes precedence over channel priority. Overrides the value given by conda config --show channel_priority.
--solver
string
Choose which solver backend to use.

Channel Customization

-c, --channel
string
Additional channel to search for packages. These are URLs searched in the order they are given (including local directories using the file:// syntax or simply a path like /home/conda/mychan or ../mychan). Can be used multiple times.
--use-local
boolean
Use locally built packages. Identical to -c local.
-O, --override-channels
boolean
Do not search default or .condarc channels. Requires —channel.
--repodata-fn
string
Specify file name of repodata on the remote server. Can be passed multiple times.
--experimental
string
Enable experimental features. Options: jlap (download incremental package index data), lock (use locking when reading/updating index cache).
--no-lock
boolean
Disable locking when reading, updating index (repodata.json) cache.
--repodata-use-zst / --no-repodata-use-zst
boolean
Check for/do not check for repodata.json.zst. Enabled by default.

Package Linking and Install-time Options

--clobber
boolean
Allow clobbering (i.e. overwriting) of overlapping file paths within packages and suppress related warnings.
--copy
boolean
Install all packages using copies instead of hard- or soft-linking.
--no-shortcuts
boolean
Don’t install start menu shortcuts.
--shortcuts-only
string
Install shortcuts only for this package name. Can be used several times.

Networking Options

-C, --use-index-cache
boolean
Use cache of channel index files, even if it has expired. This is useful if you don’t want conda to check whether a new version of the repodata file exists.
-k, --insecure
boolean
Allow conda to perform “insecure” SSL connections and transfers. Equivalent to setting ssl_verify to false.
--offline
boolean
Offline mode. Don’t connect to the Internet.

Output, Prompt, and Flow Control Options

--download-only
boolean
Solve an environment and ensure package caches are populated, but exit prior to unlinking and linking packages into the prefix.
--show-channel-urls
boolean
Show channel urls. Overrides the value given by conda config --show show_channel_urls.
--json
boolean
Report all output as json. Suitable for using conda programmatically.
-v, --verbose
boolean
Can be used multiple times. Once for detailed output, twice for INFO logging, thrice for DEBUG logging, four times for TRACE logging.
-q, --quiet
boolean
Do not display progress bar.
-d, --dry-run
boolean
Only display what would have been done.
-y, --yes
boolean
Sets any confirmation values to ‘yes’ automatically. Users will not be asked to confirm any adding, deleting, backups, etc.

Environment Protection

--override-frozen
boolean
DANGEROUS. Use at your own risk. Ignore protections if the environment is frozen.

Examples

conda install scipy

Common Use Cases

Installing Multiple Packages

Install multiple packages in a single command:
conda install numpy pandas matplotlib scikit-learn

Installing to a New Environment

Install packages to a named environment:
conda install -n data-science jupyter notebook pandas

Installing with Channel Priority

Install from conda-forge with strict channel priority:
conda install -c conda-forge --strict-channel-priority tensorflow

Installing Without Breaking Dependencies

Use --freeze-installed to prevent updates to existing packages:
conda install --freeze-installed new-package

Reverting to Previous State

Revert environment to a previous revision:
conda install --revision 2
When using explicit filenames (e.g., ./package.tar.bz2), conda implies the --no-deps option and should be used with great caution. Explicit filenames and package specifications cannot be mixed in a single command.
Using --no-deps may result in an environment with incompatible packages. Use this option with great caution.