[conda env create]: Order of package installation differs from order of dependencies in yaml file

I am testing conda env create -f with a yaml file in which only python has a version number.

My expectations were that:

  1. Being the 1st item of the dependencies list, python 3.9 (the requested version), would be the first “package” installed.
  • Result: the installation order is not that of the dependencies
  1. (Perhaps because of 1.) The requested python version is ignored.
  • Result: python-3.11.0 is installed

Q: Is there a way to enforce the order of the dependencies in the yaml file?

  • Partial output of conda env create logging:
(base) C:\Users\me>conda env create -f env_ds39_from_ds310.yml
Collecting package metadata (repodata.json): done
Solving environment: done

Downloading and Extracting Packages
jupyter_core-5.2.0   | 129 KB    | ######[]# | 100%
jupyter_client-8.0.2 | 101 KB    | ######[]# | 100%
libclang13-15.0.7    | 20.9 MB   | ######[]# | 100%
python-3.11.0        | 18.9 MB   | ######[]9 | 100%    >>>>>   asked for 3.9!
contourpy-1.0.7      | 167 KB    | ######[]# | 100%
traitlets-5.9.0      | 96 KB     | ######[]# | 100%
[]
  • The top of my yaml file:
name: ds39
channels:
- conda-forge
- bioconda
- pyviz
- nvidia
- defaults
dependencies:
- python=3.9
- pip
- numpy
- scipy
- ipython
- ipykernel
- ipywidgets
[]
  • conda info:
     active environment : base
    active env location : C:\Users\me\miniconda3
            shell level : 1
       user config file : C:\Users\me\.condarc
 populated config files : C:\Users\me\.condarc
          conda version : 22.11.1
    conda-build version : 3.23.3
         python version : 3.10.8.final.0
       virtual packages : __archspec=1=x86_64
                          __cuda=11.6=0
                          __win=0=0
       base environment : C:\Users\me\miniconda3  (writable)
      conda av data dir : C:\Users\me\miniconda3\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/bioconda/win-64
                          https://conda.anaconda.org/bioconda/noarch
                          https://conda.anaconda.org/pyviz/win-64
                          https://conda.anaconda.org/pyviz/noarch
                          https://conda.anaconda.org/nvidia/win-64
                          https://conda.anaconda.org/nvidia/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\me\miniconda3\pkgs
                          C:\Users\me\.conda\pkgs
                          C:\Users\me\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\me\miniconda3\envs
                          C:\Users\me\.conda\envs
                          C:\Users\me\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/22.11.1 requests/2.28.2 CPython/3.10.8 Windows/10 Windows/10.0.19044
          administrator : False
             netrc file : None
           offline mode : False

Hold off your answers, please!

I need to find out if the problem is due to the mis-formatted yaml file I used (i.e. the entries are not properly indented).

Thanks.

Never mind!

I checked the history file in the newly create env: it turns out that conda installed both 3.11 and the requested 3.9 (and performed a downgrade??).

Here are the few entries around python from (ds39)>conda list

pyspark                   3.3.1              pyhd8ed1ab_0    conda-forge
pytest                    7.2.1              pyhd8ed1ab_0    conda-forge
python                    3.9.16          h4de0772_0_cpython    conda-forge     >>> yoohoo!
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-dotenv             0.21.1             pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.16.2             pyhd8ed1ab_0    conda-forge
python-graphviz           0.20.1             pyh22cad53_0    conda-forge