python – conda won’t update environment through environment.yml

I have an environment.yml file with the following content:

channels:
  - conda-forge
  - defaults
dependencies:
  - python=3.10
  - pandas
  - matplotlib
  - control
  - scipy
  - pathlib
  - numpy
  - tomli
  - sphinx
  - furo
  - sphinx-toolbox
  - sphinx-autodoc-typehints
  - pytest
  - mypy
  - black
  - flake8
  - coverage
  - h5py

I created an environment named pippo with conda create --name pippo python=3.10, then I run conda activate pippo and finally I run conda env update --name pippo --file environment.yml --prune.

The output is:

conda-forge/osx-arm64                                       Using cache
conda-forge/noarch                                          Using cache
pkgs/r/noarch                                                 No change
pkgs/main/noarch                                              No change
pkgs/main/osx-arm64                                           No change
pkgs/r/osx-arm64                                              No change
Collect all metadata (repodata.json): done
Solving environment: done
#
# To activate this environment, use
#
#     $ conda activate pippo
#
# To deactivate an active environment, use
#
#     $ conda deactivate

whereas I expected the packages in environment.yml to be installed.

How to solve it?

Read more here: Source link