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

"conda list" has multiple entries for a package after "conda env update" #4210

Closed
jimm-domingo opened this issue Jan 6, 2017 · 4 comments
Closed
Labels
locked [bot] locked due to inactivity source::community catch-all for issues filed by community members stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity type::bug describes erroneous operation, use severity::* to classify the type

Comments

@jimm-domingo
Copy link

We've uncovered an interesting behavior with conda env update that results in an environment with multiple entries for a couple packages in conda list output.

Background

We use a environment specifiation file to create a conda environment for our Python software (using conda env create -f ...). When users install a new release (i.e., an update) of our software, our updater runs a conda env update with the specification file to update the environment. We've discovered that some of our users have multiple entries for two packages in their environments.

Steps to reproduce it

Here's a trimmed down version of our specification file that installs Python 3.4 and PyQt 4.11.4:

C:\Users\jdoe> type env-spec_build-4.yml
name: test-env
dependencies:
- pyqt=4.11.4=py34_4
- python=3.4

NOTE: our original file does not specify the build for the pyqt package (i.e., it only has pyqt=4.11.1). When our users first installed our software, build 4 was the latest build available for Windows. Therefore, we include the build above to reproduce those conditions.

C:\Users\jdoe> conda env create -f env-spec_build-4.yml
Fetching package metadata .........
Solving package specifications: ..........
Linking packages ...
        1 file(s) copied.########################################        |  84%
        1 file(s) copied.############################################    |  92%
[      COMPLETE      ]|##################################################| 100%
#
# To activate this environment, use:
# > activate test-env
#
# To deactivate this environment, use:
# > deactivate
#

The environment is created successfully as expected:

C:\Users\jdoe> conda list -n test-env
# packages in environment at C:\Users\jdoe\Anaconda3\envs\test-env:
#
jpeg                      8d                       vc10_2  [vc10]
libpng                    1.6.27                   vc10_0  [vc10]
libtiff                   4.0.6                    vc10_2  [vc10]
openssl                   1.0.2j                   vc10_0  [vc10]
pip                       9.0.1                    py34_1
pyqt                      4.11.4                   py34_4
python                    3.4.5                         0
qt                        4.8.7                    vc10_9  [vc10]
setuptools                27.2.0                   py34_1
sip                       4.16.9                   py34_2
vs2010_runtime            10.00.40219.1                 2
wheel                     0.29.0                   py34_0
zlib                      1.2.8                    vc10_3  [vc10]

Later on, we released a newer version of our Python software. There was no change in our conda environment specification. However, at that time, build 7 of the windows package of pyqt 4.11.4
was available. So when our updater ran conda env update with our spec file on a user's system, that build was installed.

To reproduce that situation, we use a variation of the first file that now specifies build 7:

C:\Users\jdoe> type env-spec_build-7.yml
name: test-env
dependencies:
- pyqt=4.11.4=py34_7
- python=3.4

Everything appears to work OK when conda env update is executed:

C:\Users\jdoe> conda env update -f env-spec_build-7.yml
Fetching package metadata .........
Solving package specifications: ..........
Linking packages ...
        1 file(s) copied.#######################                         |  50%
[      COMPLETE      ]|##################################################| 100%
#
# To activate this environment, use:
# > activate test-env
#
# To deactivate this environment, use:
# > deactivate
#

However, conda list now shows two entries for both the pyqt and sip packages:

C:\Users\jdoe> conda list -n test-env
# packages in environment at C:\Users\jdoe\Anaconda3\envs\test-env:
#
jpeg                      8d                       vc10_2  [vc10]
libpng                    1.6.27                   vc10_0  [vc10]
libtiff                   4.0.6                    vc10_2  [vc10]
openssl                   1.0.2j                   vc10_0  [vc10]
pip                       9.0.1                    py34_1
pyqt                      4.11.4                   py34_4
pyqt                      4.11.4                   py34_7
python                    3.4.5                         0
qt                        4.8.7                    vc10_9  [vc10]
setuptools                27.2.0                   py34_1
sip                       4.16.9                   py34_2
sip                       4.18                     py34_0
vs2010_runtime            10.00.40219.1                 2
wheel                     0.29.0                   py34_0
zlib                      1.2.8                    vc10_3  [vc10]

conda info

Current conda install:

             platform : win-64
        conda version : 4.1.11
    conda-env version : 2.5.2
  conda-build version : 1.14.1
       python version : 3.4.3.final.0
     requests version : 2.11.1
     root environment : C:\Users\jdoe\Anaconda3  (writable)
  default environment : C:\Users\jdoe\Anaconda3
     envs directories : C:\Users\jdoe\Anaconda3\envs
        package cache : C:\Users\jdoe\Anaconda3\pkgs
         channel URLs : https://repo.continuum.io/pkgs/free/win-64/
                        https://repo.continuum.io/pkgs/free/noarch/
                        https://repo.continuum.io/pkgs/pro/win-64/
                        https://repo.continuum.io/pkgs/pro/noarch/
                        https://repo.continuum.io/pkgs/msys2/win-64/
                        https://repo.continuum.io/pkgs/msys2/noarch/
          config file : None
         offline mode : False
    is foreign system : False
@jimm-domingo
Copy link
Author

The revision history for the test-env shows that the pyqt and sip packages were not updated, but rather added to the environment by the conda env update command:

C:\Users\jdoe> conda list -n test-env --revisions
2017-01-06 15:12:07  (rev 0)
    jpeg-8d-vc10_2
    libpng-1.6.27-vc10_0
    libtiff-4.0.6-vc10_2
    openssl-1.0.2j-vc10_0
    pip-9.0.1-py34_1
    pyqt-4.11.4-py34_4
    python-3.4.5-0
    qt-4.8.7-vc10_9
    setuptools-27.2.0-py34_1
    sip-4.16.9-py34_2
    vs2010_runtime-10.00.40219.1-2
    wheel-0.29.0-py34_0
    zlib-1.2.8-vc10_3

2017-01-06 15:13:22  (rev 1)
    +pyqt-4.11.4
    +sip-4.18

@jimm-domingo
Copy link
Author

I attempted to reproduce the same sequence of environment changes with conda itself (i.e., instead of using conda env).

First, I created an environment with conda install using the same specifications as in the env-spec_build-4.yml file mentioned above:

C:\Users\jdoe> conda create -n test-install python=3.4 pyqt=4.11.4=py34_4
Fetching package metadata .........
Solving package specifications: ..........

Package plan for installation in environment C:\Users\jdoe\Anaconda3\envs\test-install:

The following NEW packages will be INSTALLED:

    jpeg:           8d-vc10_2       [vc10]
    libpng:         1.6.27-vc10_0   [vc10]
    libtiff:        4.0.6-vc10_2    [vc10]
    openssl:        1.0.2j-vc10_0   [vc10]
    pip:            9.0.1-py34_1
    pyqt:           4.11.4-py34_4
    python:         3.4.5-0
    qt:             4.8.7-vc10_9    [vc10]
    setuptools:     27.2.0-py34_1
    sip:            4.16.9-py34_2
    vs2010_runtime: 10.00.40219.1-2
    wheel:          0.29.0-py34_0
    zlib:           1.2.8-vc10_3    [vc10]

Proceed ([y]/n)? y

Linking packages ...
        1 file(s) copied.########################################        |  84%
        1 file(s) copied.############################################    |  92%
[      COMPLETE      ]|##################################################| 100%

C:\Users\jdoe> conda list -n test-install
# packages in environment at C:\Users\jdoe\Anaconda3\envs\test-install:
#
jpeg                      8d                       vc10_2  [vc10]
libpng                    1.6.27                   vc10_0  [vc10]
libtiff                   4.0.6                    vc10_2  [vc10]
openssl                   1.0.2j                   vc10_0  [vc10]
pip                       9.0.1                    py34_1
pyqt                      4.11.4                   py34_4
python                    3.4.5                         0
qt                        4.8.7                    vc10_9  [vc10]
setuptools                27.2.0                   py34_1
sip                       4.16.9                   py34_2
vs2010_runtime            10.00.40219.1                 2
wheel                     0.29.0                   py34_0
zlib                      1.2.8                    vc10_3  [vc10]

Then, I updated the pyqt package to the newer build 7:

C:\Users\jdoe> conda install -n test-install pyqt=4.11.4=py34_7
Fetching package metadata .........
Solving package specifications: ..........

Package plan for installation in environment C:\Users\jdoe\Anaconda3\envs\test-install:

The following packages will be UPDATED:

    pyqt: 4.11.4-py34_4 --> 4.11.4-py34_7
    sip:  4.16.9-py34_2 --> 4.18-py34_0

Proceed ([y]/n)? y

Unlinking packages ...
[      COMPLETE      ]|##################################################| 100%
Linking packages ...
[      COMPLETE      ]|##################################################| 100%

This sequence produces an environment as expected, i.e., conda list has only one entry each for the pyqt and sip packages:

C:\Users\jdoe> conda list -n test-install
# packages in environment at C:\Users\jdoe\Anaconda3\envs\test-install:
#
jpeg                      8d                       vc10_2  [vc10]
libpng                    1.6.27                   vc10_0  [vc10]
libtiff                   4.0.6                    vc10_2  [vc10]
openssl                   1.0.2j                   vc10_0  [vc10]
pip                       9.0.1                    py34_1
pyqt                      4.11.4                   py34_7
python                    3.4.5                         0
qt                        4.8.7                    vc10_9  [vc10]
setuptools                27.2.0                   py34_1
sip                       4.18                     py34_0
vs2010_runtime            10.00.40219.1                 2
wheel                     0.29.0                   py34_0
zlib                      1.2.8                    vc10_3  [vc10]

And the revision history shows that those two packages were upgraded (in rev 1) and not added a second time:

C:\Users\jdoe> conda list -n test-install --revisions
2017-01-09 14:06:41  (rev 0)
    jpeg-8d-vc10_2
    libpng-1.6.27-vc10_0
    libtiff-4.0.6-vc10_2
    openssl-1.0.2j-vc10_0
    pip-9.0.1-py34_1
    pyqt-4.11.4-py34_4
    python-3.4.5-0
    qt-4.8.7-vc10_9
    setuptools-27.2.0-py34_1
    sip-4.16.9-py34_2
    vs2010_runtime-10.00.40219.1-2
    wheel-0.29.0-py34_0
    zlib-1.2.8-vc10_3

2017-01-09 14:07:48  (rev 1)
     pyqt  {4.11.4 -> 4.11.4}
     sip  {4.16.9 -> 4.18}

@kalefranz kalefranz added source::community catch-all for issues filed by community members type::bug describes erroneous operation, use severity::* to classify the type labels May 9, 2017
@github-actions
Copy link

github-actions bot commented Aug 19, 2021

Hi there, thank you for your contribution to Conda!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue in the latest version of Conda
  2. Comment that the issue is still reproducible and include:
  • What version of Conda you reproduced the issue on
  • What OS and version you reproduced the issue on
  • What steps you followed to reproduce the issue
  1. It would also be helpful to have the output of the following commands available:
  • conda info
  • conda config --show-sources
  • conda list --show-channel-urls

NOTE: If this issue was closed prematurely, please leave a comment and we will gladly reopen the issue.

In case this issue was originally about a project that is covered by the Anaconda issue tracker (e.g. Anaconda, Miniconda, packages built by Anaconda, Inc. like Anaconda Navigator etc), please reopen the issue there again.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Aug 19, 2021
@github-actions
Copy link

Hi again!

This issue has been closed since it has not had recent activity.
Please don't hesitate to leave a comment if that was done prematurely.

Thank you for your contribution.

@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label Nov 19, 2021
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Nov 25, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity source::community catch-all for issues filed by community members stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity type::bug describes erroneous operation, use severity::* to classify the type
Projects
None yet
Development

No branches or pull requests

2 participants