conda/conda

Documentation of what can be in a package_spec

Fermée

#10 491 ouverte le 2 févr. 2021

 (8 commentaires) (7 réactions) (0 personne assignée)Python (1 416 forks)batch import
good first issuesource::communitystale::recoveredtype::documentation

Métriques du dépôt

Stars
 (5 734 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

conda create --help and conda install --help say

usage: conda create [options…] [package_spec [package_spec ...]]

Create a new conda environment from a list of specified packages. To use the created
environment, use 'conda activate envname' look in that directory first.  This command
requires either the -n NAME or -p PREFIX option.

Options:

positional arguments:
  package_spec          Packages to install or update in the conda
                        environment.
[etc]
usage: conda install [options…] [package_spec [package_spec ...]]

Installs a list of packages into a specified conda environment.

    This command accepts a list of package specifications (e.g, bitarray=0.8)
    and installs a set of packages consistent with those specifications and
    compatible with the underlying environment. If full compatibility cannot
    be assured, an error is reported and the environment is not changed.

    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. To prevent existing packages from updating,
    use the --freeze-installed option. This may force conda to install older
    versions of the requested packages, and it does not prevent additional
    dependency packages from being installed.

    If you wish to skip dependency checking altogether, use the '--no-deps'
    option. This may result in an environment with incompatible packages, so
    this option must be used with great caution.

    conda can also be called with a list of explicit conda package filenames
    (e.g. ./lxml-3.2.0-py27_0.tar.bz2). Using conda in this mode implies the
    --no-deps option, and should likewise be used with great caution. Explicit
    filenames and package specifications cannot be mixed in a single command.

Options:

positional arguments:
  package_spec          Packages to install or update in the conda
                        environment.
[etc]

I did not find any documentation explaining exactly what can appear in a package_spec. The Managing Packages page on docs.conda.io gives examples including conda install scipy and conda install scipy=0.15.0 but I believe other operators (e.g. scipy>=0.15.0) are also available.

It would be great if there was a documentation page explaining:

  • Exactly what syntax can appear in a package_spec on create and install command lines

  • What the list of operators available is, and whether there is any difference between scipy=0.15.0 and scipy==0.15.0

  • What caveats, if any, there are with using a plain unqualified package_spec as in conda install scipy.

    The install --help appears to say that this will install the latest version of scipy (“Conda attempts to install the newest versions of the requested packages“). Does this mean the newest available in the selected channels, or the newest available whose dependencies are satisfiable from the selected channels, or… perhaps other caveats as well.

Guide contributeur