Skip to content

Upgrading to 0.3 for users running anaconda **CANNOT** be done properly using pip #1805

Closed

Description

@mwcraig

Quick summary

Updating via pip install --upgrade --no-deps astropy will leave users with a mix of files from 0.2.5 and 0.3

See https://gist.github.com/mwcraig/7523054 for steps to reproduce and the result...but a highlight of the result is that both of these imports succeed if astropy is updated this way:

from astropy.convolution import convolve, Gaussian1DKernel
from astropy.nddata.convolution.make_kernel import make_kernel 

Long version:

In the anaconda python distribution astropy is installed with the conda package manager. Upgrading via pip with either:

pip install --upgrade --no-deps astropy

or, the version I used when I forget that no-deps exists,

pip uninstall astropy
pip install astropy

will result in an installation of astropy that is a hybrid of 0.2.5 and 0.3. The reason, as far as I can tell, is that pip can't really uninstall 0.2.5 because it has no record what was installed; it sees only an egg-info file.

As a result, pip uninstall does not remove the astropy directory from site-packages. pip install puts 0.3 over that pre-existing directory; any files that existed in 0.2.5 but no longer exist in 0.3 remain because they have been neither deleted nor overwritten.

Fix:

Conda users should be told to update with

conda update astropy

which will be available whenever anaconda builds the package.

I have tested that this works properly (i.e. the number of tests discovered matches those in the installation issue worksheet and the tests pass with no errors) by building a conda package of 0.3rc1. You can test it in anaconda with:

conda update --channel http://conda.binstar.org/mwcraig astropy

Activity

  1. mwcraig commented on Nov 18, 2013

    @mwcraig
    MemberAuthor

    FYI, anaconda is moving rapidly towards a smoother integration with pip, it looks like--https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/JjFXwT0cSBg

    Don't think it changes the advice about this particular release, though.

  2. added a commit that references this issue on Nov 18, 2013
    fc6079d
  3. embray commented on Nov 19, 2013

    @embray
    Member

    Yeah, that's good that they're working on tighter integration between conda and pip. But as it stands, I don't think it's a "bug" that this leads to inconsistencies--conda is the package manage for Anaconda and it's correct to manage packages included in Anaconda through conda. This is no different than if you tried to install over packages installed by your Linux system package manager. But we should definitely include the correct instructions for Anaconda users!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions