Package search and install specifications#

Conda supports the following specifications for conda search and conda install.

Package installation#

When you're installing packages, conda recommends being as concrete as possible. Using * wildcards and version ranges during an install will most likely cause a conflict.

However, * wildcards can still be helpful in an install command when used sparingly.

Installing with wildcards#

Let's say you are working on a project that requires version 2.3 of a package. If you upgrade to 2.4 or 3.0, your project will break. You're also using an environment file to create your environment.

In the version 2.3.1, 2 is the major version, 3 is the minor version, and 1 is the patch. Patches typically contain bug fixes, so if you want to keep version 2.3 in your environment without updating to 2.4 or 3.0, but want to take advantage of any bug fixes, using 2.3.* in your environment file would be helpful to you.

Concrete install example#

Let's take the search from the Package search section.

$ conda search "conda-forge/linux-64::numpy 1.17.* py38*"

This returns the following:

Loading channels: done
# Name                       Version           Build  Channel
numpy                         1.17.3  py38h95a1406_0  conda-forge
numpy                         1.17.5  py38h18fd61f_1  conda-forge
numpy                         1.17.5  py38h95a1406_0  conda-forge

You can then choose a specific version and build, if necessary, and edit your conda install command accordingly.

$ conda install "conda-forge/linux-64::numpy 1.17.5 py38h95a1406_0"