Skip to content

distributed 2.0.0 is installed in a python 2 environment #2804

Closed

Description

@cpaulik

Doing a simple pip install dask distributed results in the following:

Successfully built distributed
ERROR: distributed 2.0.0 has requirement dask>=2, but you'll have dask 1.2.2 which is incompatible.
Installing collected packages: dask, cloudpickle, msgpack, sortedcontainers, tblib, toolz, heapdict, zict, distributed
Successfully installed cloudpickle-1.2.1 dask-1.2.2 distributed-2.0.0 heapdict-1.0.0 msgpack-0.6.1 sortedcontainers-2.1.0 tblib-1.4.0 toolz-0.9.0 zict-1.0.0

I think the metadata on distributed 2.0.0 is not set correctly since it is still installed although it seems incompatible

Activity

  1. TomAugspurger commented on Jun 26, 2019

    @TomAugspurger
    Member

    Ahh whoops. So what do we do now? First we'll need to fix master by setting a python_requires in setup.py. But how do we fix what's released?

    IIRC, Django did the same thing. I'll see what I can find.

  2. TomAugspurger commented on Jun 26, 2019

    @TomAugspurger
    Member

    https://stackoverflow.com/a/47692662

    https://code.djangoproject.com/ticket/28878

    So right now, as a user, you can do

    # requirements.txt
    distributed>=1.28,<2.0; python_version<"3.5"
    distributed>=2.0; python_version>="3.5"
    
  3. TomAugspurger commented on Jun 26, 2019

    @TomAugspurger
    Member

    #2806 fixes things going forward.

    I'm not sure there's anything we can do about the bad package out on PyPI. I think you'll have to pin distributed<2 in your requirements.txt The PyPI admins updated the metadata for Django, but it's the internet and people complained.

    At least after #2806 you'll get a failure at install time, rather than when attempting to import distributed.

  4. cpaulik commented on Jun 26, 2019

    @cpaulik
    Author

    Is deleting the 2.0.0 release an option after 2.0.1 was uploaded? Or maybe a post release? No idea how pip would interpret a post release.

  5. TomAugspurger commented on Jun 26, 2019

    @TomAugspurger
    Member
  6. mrocklin commented on Jun 26, 2019

    @mrocklin
    Member

    Would a post release fix the install for python 2 users? Or would pip see that distributed 2.0.0 (not post) allegedly supports Py2, and install that?

    My guess is that pip would download the 2.0.0 release.

    Personally I'm fine with deleting the old file. We've (I've) done this before when we botched a release.

  7. mrocklin commented on Jun 26, 2019

    @mrocklin
    Member

    Personally my inclination is to add a python_requires keyword, republish, and then delete the old file.

  8. added a commit that references this issue on Jun 26, 2019
    ab82535
  9. mrocklin commented on Jun 26, 2019

    @mrocklin
    Member

    Alternative #2807

  10. mrocklin commented on Jun 26, 2019

    @mrocklin
    Member

    @TomAugspurger can you say more about why deleting the file would be frowned upon? I don't think that many operational systems currently depend on that file, and I'm quite willing to make those people sad if necessary.

  11. TomAugspurger commented on Jun 26, 2019

    @TomAugspurger
    Member

    Just a recollection, which I may be misremembering. Perhaps it’s deleting and republishing that’s bad.

  12. mrocklin commented on Jun 26, 2019

    @mrocklin
    Member

    I'm not sure you can even do that. We'll be bumping to 2.0.1.

    Anyway, if you don't have a strong objection, I'll just do this now.

  13. TomAugspurger commented on Jun 26, 2019

    @TomAugspurger
    Member

    Yep, go for it.

  14. added a commit that references this issue on Jun 26, 2019
    8990c98
  15. cpaulik commented on Jun 26, 2019

    @cpaulik
    Author

    Thanks. This has solved it for me.

    The only thing which might be required is a pip install dask distributed --no-cache-dir if you've installed the 2.0.0 release before on a machine

  16. mrocklin commented on Jun 26, 2019

    @mrocklin
    Member

    Thank you @dwhswenson and @cpaulik for bringing this to our attention. I've pushed a 2.0.1 package with the correct metadata and removed the offending 2.0.0 package. I've tried things locally in a Python 2 environment and things seem to be fine.

    Also, I encourage you both to participate in the Dask User Survey which is going on now. It would be useful to get your perspective, given that you both support Python 2 communities.

  17. cpaulik commented on Jun 26, 2019

    @cpaulik
    Author

    Just noticed that the 2.0.0 package is still on conda-forge https://anaconda.org/conda-forge/distributed/files

    that could cause confusion and potentially broken environments.

  18. TomAugspurger commented on Jun 26, 2019

    @TomAugspurger
    Member
  19. cpaulik commented on Jun 26, 2019

    @cpaulik
    Author

    It is fine actually. Sorry. Since conda is smarter than pip it figures out that it can't install dask-core>2.0 on python 2.7

  20. dwhswenson commented on Jun 26, 2019

    @dwhswenson

    Thanks for the quick fix -- just reran that test and it works again!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions