holoviz / geoviews

Simple, concise geographical visualization in Python
http://geoviews.org
BSD 3-Clause "New" or "Revised" License
578 stars 75 forks source link

Cannot import name 'get_raster_array' #128

Closed jackdbd closed 6 years ago

jackdbd commented 6 years ago

I created a Python 3.4 conda environment (I use miniconda), and I'm getting an ImportError as soon as I try to import geoviews:

import geoviews as gv

Here is the traceback:

Traceback (most recent call last):
  File "/home/jack/Repos/geopython/snippet.py", line 1, in <module>
    import geoviews as gv
  File "/home/jack/miniconda3/envs/geopython/lib/python3.4/site-packages/geoviews/__init__.py", line 13, in <module>
    from . import plotting                              # noqa (API import)
  File "/home/jack/miniconda3/envs/geopython/lib/python3.4/site-packages/geoviews/plotting/__init__.py", line 1, in <module>
    from . import mpl # noqa
  File "/home/jack/miniconda3/envs/geopython/lib/python3.4/site-packages/geoviews/plotting/mpl/__init__.py", line 16, in <module>
    from holoviews.plotting.mpl.util import get_raster_array
ImportError: cannot import name 'get_raster_array'

In holoviews.plotting.mpl.util I can't find the function get_raster_array.

Here are my versions of geoviews and holoviews:

https://conda.anaconda.org/ioam/linux-64/geoviews-1.3.0-py34_0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/holoviews-1.6.2-py34_0.tar.bz2
philippjfr commented 6 years ago

I'd suggest updating GeoViews to 1.4.3 and HoloViews to 1.9.2. Unfortunately support for Python 3.4 was dropped by conda-forge, so we no longer provide packages for it. I'd therefore also suggest updating to Python 3.5 or 3.6.

jackdbd commented 6 years ago

I created a Python 3.6 environment and now the imports are working fine. Thanks!

geoviews                  1.4.2                    py36_0    ioam
holoviews                 1.9.2                    py36_0    conda-forge
philippjfr commented 6 years ago

Thanks for reporting back and glad it's working for you! The geoviews 1.5 and holoviews 1.10, should bring lots of new features along with a complete overhaul of the GeoViews docs.