dask / dask-glm

BSD 3-Clause "New" or "Revised" License
75 stars 46 forks source link

Dask-glm throws ContextualVersionConflict #67

Closed Shellcat-Zero closed 6 years ago

Shellcat-Zero commented 6 years ago

After running either pip install dask-glm or conda install dask-glm the dask-glm-bench notebook fails to import the line from dask_glm.algorithms import proximal_grad, admm with a ContextualVersionConflict error:

ContextualVersionConflict                 Traceback (most recent call last)
<ipython-input-11-ccb1387c99f5> in <module>()
      2 import dask.array as da
      3 import numpy as np
----> 4 from dask_glm.algorithms import proximal_grad, admm
      5 from dask_glm.utils import make_y

/opt/anaconda/lib/python3.5/site-packages/dask_glm/__init__.py in <module>()
      1 from pkg_resources import get_distribution, DistributionNotFound
      2 try:
----> 3     __version__ = get_distribution(__name__).version
      4 except DistributionNotFound:
      5     pass

/opt/anaconda/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/pkg_resources/__init__.py in get_distribution(dist)
    555         dist = Requirement.parse(dist)
    556     if isinstance(dist, Requirement):
--> 557         dist = get_provider(dist)
    558     if not isinstance(dist, Distribution):
    559         raise TypeError("Expected string, Requirement, or Distribution", dist)

/opt/anaconda/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/pkg_resources/__init__.py in get_provider(moduleOrReq)
    429     """Return an IResourceProvider for the named module or requirement"""
    430     if isinstance(moduleOrReq, Requirement):
--> 431         return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
    432     try:
    433         module = sys.modules[moduleOrReq]

/opt/anaconda/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/pkg_resources/__init__.py in require(self, *requirements)
    966         included, even if they were already activated in this working set.
    967         """
--> 968         needed = self.resolve(parse_requirements(requirements))
    969 
    970         for dist in needed:

/opt/anaconda/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/pkg_resources/__init__.py in resolve(self, requirements, env, installer, replace_conflicting)
    857                 # Oops, the "best" so far conflicts with a dependency
    858                 dependent_req = required_by[req]
--> 859                 raise VersionConflict(dist, req).with_context(dependent_req)
    860 
    861             # push the new requirements onto the stack

ContextualVersionConflict: (multipledispatch 0.4.8 (/opt/anaconda/lib/python3.5/site-packages), Requirement.parse('multipledispatch>=0.4.9'), {'dask-glm'})

Both pip freeze and conda list show that multipledispatch version 0.4.9 is installed satisfying the dask-glm requirement, so I am not sure what to do here.

TomAugspurger commented 6 years ago

Your setuptools looks pretty old. Can you try upgrading that?

Shellcat-Zero commented 6 years ago

I presume they were automatically setup using dask-ec2 when I launched the EC2 cluster. Which setuptools are you referring to, or how do I update them?

TomAugspurger commented 6 years ago

Setuptools is a python packaging library: https://setuptools.readthedocs.io/en/latest/

pip install --upgrade setuptools should do it.

On Sat, Feb 17, 2018 at 2:35 PM, Shellcat-Zero notifications@github.com wrote:

I presume they were automatically setup using dask-ec2 when I launched the EC2 cluster. Which setuptools are you referring to, or how do I update them?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dask/dask-glm/issues/67#issuecomment-366469487, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQHIgLyc1PtKaVfq4UbtlUUjZE5m-Eyks5tVzf6gaJpZM4SJEL8 .

Shellcat-Zero commented 6 years ago

Ah yes, thanks, I thought you were referring to something more conda-specific. I'm going to re-create the cluster (I've already destroyed it) and try this again to verify.

mrocklin commented 6 years ago

Before relying too heavily on dask-ec2 you may want to read http://dask.pydata.org/en/latest/setup/cloud.html

On Sat, Feb 17, 2018 at 3:41 PM, Shellcat-Zero notifications@github.com wrote:

Ah yes, thanks, I thought you were referring to something more conda-specific. I'm going to re-create the cluster (I've already destroyed it) and try this again to verify.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dask/dask-glm/issues/67#issuecomment-366469845, or mute the thread https://github.com/notifications/unsubscribe-auth/AASszIl2AoveigtK1C8s_vTs_eliqnPpks5tVzlmgaJpZM4SJEL8 .

Shellcat-Zero commented 6 years ago

I'll have a look, thanks.

Shellcat-Zero commented 6 years ago

Updating setuptools worked, thanks. Closing issue.