Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pruning environment from yaml file doesn't respect pip changes #1333

Closed
marcelned opened this issue Dec 5, 2021 · 3 comments
Closed

Pruning environment from yaml file doesn't respect pip changes #1333

marcelned opened this issue Dec 5, 2021 · 3 comments

Comments

@marcelned
Copy link

marcelned commented Dec 5, 2021

Environment:

  • mamba 0.19.0
  • conda 4.11.0

Issue:

# environment.yaml
name: test
dependencies:
  - numpy
  - pip
  - pip:
    - pandas
$ mamba env create -f environment.yml
$ mamba list -n test

# Name                    Version                   Build  Channel
bzip2                     1.0.8                h0d85af4_4    conda-forge
ca-certificates           2021.10.8            h033912b_0    conda-forge
libblas                   3.9.0           12_osx64_openblas    conda-forge
libcblas                  3.9.0           12_osx64_openblas    conda-forge
libffi                    3.4.2                h0d85af4_5    conda-forge
libgfortran               5.0.0           9_3_0_h6c81a4c_23    conda-forge
libgfortran5              9.3.0               h6c81a4c_23    conda-forge
liblapack                 3.9.0           12_osx64_openblas    conda-forge
libopenblas               0.3.18          openmp_h3351f45_0    conda-forge
libzlib                   1.2.11            h9173be1_1013    conda-forge
llvm-openmp               12.0.1               hda6cdc1_1    conda-forge
ncurses                   6.2                  h2e338ed_4    conda-forge
numpy                     1.21.4          py310hd5a656b_0    conda-forge
openssl                   3.0.0                h0d85af4_2    conda-forge
pandas                    1.3.4                    pypi_0    pypi
pip                       21.3.1             pyhd8ed1ab_0    conda-forge
python                    3.10.0          h38b4d05_3_cpython    conda-forge
python-dateutil           2.8.2                    pypi_0    pypi
python_abi                3.10                    2_cp310    conda-forge
pytz                      2021.3                   pypi_0    pypi
readline                  8.1                  h05e3726_0    conda-forge
setuptools                59.4.0          py310h2ec42d9_0    conda-forge
six                       1.16.0                   pypi_0    pypi
sqlite                    3.37.0               h23a322b_0    conda-forge
tk                        8.6.11               h5dbffcc_1    conda-forge
tzdata                    2021e                he74cb21_0    conda-forge
wheel                     0.37.0             pyhd8ed1ab_1    conda-forge
xz                        5.2.5                haf1e3a3_1    conda-forge
zlib                      1.2.11            h9173be1_1013    conda-forge

Now say we want to change some pip packages, adding scipy and removing pandas:

# environment.yaml
name: test
dependencies:
  - numpy
  - pip
  - pip:
    - scipy
$ mamba env update --name test -f environment.yml --prune
$ mamba list -n test

# Name                    Version                   Build  Channel
bzip2                     1.0.8                h0d85af4_4    conda-forge
ca-certificates           2021.10.8            h033912b_0    conda-forge
libblas                   3.9.0           12_osx64_openblas    conda-forge
libcblas                  3.9.0           12_osx64_openblas    conda-forge
libffi                    3.4.2                h0d85af4_5    conda-forge
libgfortran               5.0.0           9_3_0_h6c81a4c_23    conda-forge
libgfortran5              9.3.0               h6c81a4c_23    conda-forge
liblapack                 3.9.0           12_osx64_openblas    conda-forge
libopenblas               0.3.18          openmp_h3351f45_0    conda-forge
libzlib                   1.2.11            h9173be1_1013    conda-forge
llvm-openmp               12.0.1               hda6cdc1_1    conda-forge
ncurses                   6.2                  h2e338ed_4    conda-forge
numpy                     1.21.4          py310hd5a656b_0    conda-forge
openssl                   3.0.0                h0d85af4_2    conda-forge
pandas                    1.3.4                    pypi_0    pypi
pip                       21.3.1             pyhd8ed1ab_0    conda-forge
python                    3.10.0          h38b4d05_3_cpython    conda-forge
python-dateutil           2.8.2                    pypi_0    pypi
python_abi                3.10                    2_cp310    conda-forge
pytz                      2021.3                   pypi_0    pypi
readline                  8.1                  h05e3726_0    conda-forge
scipy                     1.7.3                    pypi_0    pypi
setuptools                59.4.0          py310h2ec42d9_0    conda-forge
six                       1.16.0                   pypi_0    pypi
sqlite                    3.37.0               h23a322b_0    conda-forge
tk                        8.6.11               h5dbffcc_1    conda-forge
tzdata                    2021e                he74cb21_0    conda-forge
wheel                     0.37.0             pyhd8ed1ab_1    conda-forge
xz                        5.2.5                haf1e3a3_1    conda-forge
zlib                      1.2.11            h9173be1_1013    conda-forge

pandas has not been removed.

@baszalmstra
Copy link
Contributor

Does this work for regular conda package?

@marcelned
Copy link
Author

After testing with conda, the same issue pops up. Should this issue rather be posted on the conda repo?

@adament
Copy link
Contributor

adament commented Dec 10, 2021

This does not even work if you remove conda packages see the weirdly named issue #688 for mamba and conda/conda#7279.

@jonashaag jonashaag closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants