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

datashader import error #259

Closed
rabernat opened this issue May 17, 2018 · 9 comments · Fixed by #261
Closed

datashader import error #259

rabernat opened this issue May 17, 2018 · 9 comments · Fixed by #261

Comments

@rabernat
Copy link
Member

When I import datashader (via holoviews) on pangeo.pydata.org, I get the following error.

from holoviews.operation.datashader import regrid, shade, datashade
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-01221a9ede1c> in <module>()
      1 import holoviews as hv
      2 import datashader
----> 3 from holoviews.operation.datashader import regrid, shade, datashade

/opt/conda/lib/python3.6/site-packages/holoviews/operation/datashader.py in <module>()
    184 
    185 
--> 186 class AggregationOperation(ResamplingOperation):
    187     """
    188     AggregationOperation extends the ResamplingOperation defining an

/opt/conda/lib/python3.6/site-packages/holoviews/operation/datashader.py in AggregationOperation()
    200         'any':   rd.any,
    201         'count': rd.count,
--> 202         'first': rd.first,
    203         'last':  rd.last,
    204         'mode':  rd.mode,

AttributeError: module 'datashader.reductions' has no attribute 'first'

I think this has to do with param.

How can we modify our dockerfile in order to fix this error?

I would like to fix this asap.

cc @jbednar, @philippjfr

@rsignell-usgs
Copy link
Member

rsignell-usgs commented May 17, 2018

@rabernat The EarthSim environment installs holoviews and geoviews from repos, in case that's useful:
https://github.com/pyviz/EarthSim/blob/master/environment.yml#L47-L50

@rabernat
Copy link
Member Author

These packages move so fast that I would prefer to get the recommendation directly from the devs cc'd above.

@rsignell-usgs
Copy link
Member

@rabernat , sorry. I just figured those devs cc'd above are on EarthSim, you said ASAP, and installing from current master seems pretty fast moving. But yes, of course better to hear directly from them.

@rabernat
Copy link
Member Author

Sorry my bad, I didn't make the connection that EarthSim was directly connected to the holoviews project! Should have read more carefully!

@philippjfr
Copy link
Member

We were planning on releasing holoviews/geoviews and datashader at roughly the same time, but datashader has lagged behind a bit and it seems we are now incompatible with the latest datashader release (v0.6.5). There should be a v0.6.6 release very soon, until then I can only recommend grabbing datashader straight from GitHub.

@jbednar
Copy link

jbednar commented May 17, 2018

Alas, Datashader was our test project for the new infrastructure for building and deploying everything automatically, but that kept getting delayed by a little bit every time progress was made, and it was left in the middle of that when the person involved went on holiday May 4 (until next week). I briefly tried to build a release by hand last week, but some key bits were still in transition, and it seemed like it was going to take longer than just waiting for him to return.

That said, I think Philipp has been able to address the issues in this infrastructure in other projects over the past few days, and it may be an easy matter for him to apply those fixes to datashader as well, in which case we could have a full release of it by tomorrow. @philippjfr, is that true?

In the meantime, datashader has had dev releases recently, and you may be able to use those, as they do include first, and should be stable apart from not having any docs. You should get 0.6.6a17 from:

conda install -c pyviz/label/dev datashader

Sorry about the trouble!

@rabernat
Copy link
Member Author

rabernat commented May 17, 2018

What about @rsignell-usgs's suggestion to install from pip, as in the EarthSim environment?

    - pip:
        - git+https://github.com/ioam/holoviews.git
        - git+https://github.com/bokeh/datashader.git

Are there any downsides to doing this?

@philippjfr
Copy link
Member

Are there any downsides to doing this?

None as far as I'm aware, it should be totally sufficient to install only datashader from git though, unless you really want to stay on the holoviews bleeding edge.

@jbednar
Copy link

jbednar commented May 21, 2018

Alas, we gave you confusing and mostly incorrect advice above. The actual problem must have been that you were installing an old dev release of datashader from the 0.6.4 series, because 'first' was introduced in the 0.6.5 release back in January. So we talked above and in #263 about getting datashader from master, getting a new dev release of Datashader 0.6.6, or waiting until the full 0.6.6 release, but none of that was necessary; the fully released 0.6.5 version from January would have been fine.

Now that 0.6.6 has been released, any installation that was previously getting 0.6.4 as above would presumably still be doing so, so releasing 0.6.6 by itself wouldn't help anything. The underlying problem was presumably that something was installing datashader from a channel that lacked 0.6.5, perhaps by switching to the pyviz/label/dev channel to get a newer version of some other dependency while simultaneously thus downgrading datashader. :-( We'll look at making sure our full releases also show up on the dev channels to avoid this confusion, and we'll also make holoviews declare an optional dependency on datashader to force datashader's version to be sufficiently high if datashader is installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants