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 update package" does not update to latest version of package #786

Closed
j14r opened this issue Jun 23, 2014 · 7 comments
Closed

"conda update package" does not update to latest version of package #786

j14r opened this issue Jun 23, 2014 · 7 comments
Labels
locked [bot] locked due to inactivity

Comments

@j14r
Copy link

j14r commented Jun 23, 2014

If I build a package with the following minimal meta.yaml:

package:
  name: some-package
  version: 1.0

build:
  number: 0

and do conda install some-package it gets installed correctly. Now i want to release a new version of my package with the additional dependency of twisted:

package:
  name: some-package
  version: 2.0

requirements:
  run:
    - twisted

build:
  number: 0

and do conda update some-package conda won't update some-package to the latest (2.0) version. If I do conda update --all it works fine and updates to version 2.0.

Is this a somehow intended behavior or a bug? Note that i did not specify a source section intentionally because i want to use this as a meta package. I also added my own channel and did not install it locally (what would imply --no-deps as I understand it).

@asmeurer asmeurer self-assigned this Jun 23, 2014
@asmeurer
Copy link
Contributor

I see what is happening here. This is essentially a duplicate of #656. Conda tries to find the set of packages that are closest to the newest versions. Twisted requires going back several versions (I think it is because it is Python 2 only).

I'm not sure why conda update --all works.

@j14r
Copy link
Author

j14r commented Jun 24, 2014

Well maybe there should be an option --force-latest to conda update which adds a constraint some-package==latestversion. If this results in a conflict the second latest version is checked and so on. I think this would be trivial for one specified package. If multiple packages should be updated, I think there is no "right" solution though.

@xguse
Copy link

xguse commented Dec 7, 2016

This is still listed as open so I am postign here instead of a new issue. I also don't think that the behavior I am describing is coming from the #656 issue either, but I may be wrong.

Here is what I am seeing.

The latest version of tqdm according to my conda search is v4.10.0:

$ conda search tqdm
Fetching package metadata ...................
tqdm                         4.7.2                    py27_0  bioconda
                             4.7.2                    py27_0  conda-forge
                             4.7.2                    py34_0  conda-forge
                             4.7.2                    py34_0  bioconda
                             4.7.2                    py35_0  conda-forge
                             4.7.2                    py35_0  bioconda
                             4.7.4                    py27_0  conda-forge
                             4.7.4                    py34_0  conda-forge
                             4.7.4                    py35_0  conda-forge
                             4.7.6                    py27_0  conda-forge
                             4.7.6                    py34_0  conda-forge
                             4.7.6                    py35_0  conda-forge
                             4.8.1                    py27_0  conda-forge
                             4.8.1                    py34_0  conda-forge
                             4.8.1                    py35_0  conda-forge
                             4.8.2                    py27_0  conda-forge
                             4.8.2                    py34_0  conda-forge
                             4.8.2                    py35_0  conda-forge
                             4.8.4                    py27_0  conda-forge
                             4.8.4                    py34_0  conda-forge
                          .  4.8.4                    py35_0  conda-forge
                             4.9.0                    py27_0  conda-forge
                             4.9.0                    py34_0  conda-forge
                             4.9.0                    py35_0  conda-forge
                             4.10.0                   py27_0  conda-forge
                             4.10.0                   py34_0  conda-forge
                             4.10.0                   py35_0  conda-forge

But when I tried updating in an established environment I keep getting 4.7.2, the OLDEST existing version:

$ conda update tqdm
Fetching package metadata ...................
Solving package specifications: ..........

# All requested packages already installed.
# packages in environment at /home/gus/.anaconda/envs/cytof_collab:
#
tqdm                      4.7.2                    py35_0    bioconda

I thought that it might be because of conflicts with other installed packages so I tried creating a brand new environment with no specified package at all except tqdm and am met with the following:

$ conda create -n tqdm tqdm
Fetching package metadata ...................
Solving package specifications: ..........

Package plan for installation in environment /home/gus/.anaconda/envs/tqdm:

The following NEW packages will be INSTALLED:

    openssl:    1.0.2j-0      defaults
    pip:        9.0.1-py35_0  defaults
    python:     3.5.2-0       defaults
    readline:   6.2-2         defaults
    setuptools: 27.2.0-py35_0 defaults
    sqlite:     3.13.0-0      defaults
    tk:         8.5.18-0      defaults
    tqdm:       4.7.2-py35_0  bioconda
    wheel:      0.29.0-py35_0 defaults
    xz:         5.2.2-0       defaults
    zlib:       1.2.8-3       defaults

Proceed ([y]/n)?

Here is my conda info:

$ conda info
Current conda install:

               platform : linux-64
          conda version : 4.2.13
       conda is private : False
      conda-env version : 4.2.13
    conda-build version : 2.0.11
         python version : 3.5.2.final.0
       requests version : 2.10.0
       root environment : /home/gus/.anaconda  (writable)
    default environment : /home/gus/.anaconda/envs/none
       envs directories : /home/gus/.anaconda/envs
          package cache : /home/gus/.anaconda/pkgs
           channel URLs : https://conda.anaconda.org/bioconda/linux-64
                          https://conda.anaconda.org/bioconda/noarch
                          https://conda.anaconda.org/r/linux-64
                          https://conda.anaconda.org/r/noarch
                          https://conda.anaconda.org/pandas/linux-64
                          https://conda.anaconda.org/pandas/noarch
                          https://repo.continuum.io/pkgs/free/linux-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/pro/linux-64
                          https://repo.continuum.io/pkgs/pro/noarch
                          https://conda.anaconda.org/davidbgonzalez/linux-64
                          https://conda.anaconda.org/davidbgonzalez/noarch
                          https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/gusdunn/linux-64
                          https://conda.anaconda.org/gusdunn/noarch
            config file : /home/gus/.condarc
           offline mode : False

My only other "non-bug" idea might be an artifact of the channel ordering but that STILL seems like 'bad' behavior to me.

Thoughts?

@xguse
Copy link

xguse commented Dec 7, 2016

OK I am now seeing that conda update has options like --[no-]channel-priority that are listed as beta options. I completely see the utility of a switch for this but disagree with the default behavior. A naive user would expect update to focus on the latest aspect. That to me is the base functionality, the fundamental quality that defines the command. Adding channel into the mix is an enhancement of this function and logically that seems like it should require the user's action, NOT the other way around.

@kalefranz
Copy link
Contributor

Conda 4.4 will start associating user-requested packages to channels on first install, and then keeping those channels "sticky" until a user changes the channel.

@sorenwacker
Copy link

Is it possible to find out which package/dependency is preventing the update?

@github-actions
Copy link

Hi there, thank you for your contribution to Conda!

This issue has been automatically locked since it has not had recent activity after it was closed.

Please open a new issue if needed.

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Aug 23, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

No branches or pull requests

5 participants