0

在 jupyter notebook 中安装和导入 datashader 模块似乎有些棘手。我从我的 anaconda 提示符安装了 datashader,如下所示:

conda install -c bokeh datashader

它在目录中正确安装了模块:C:\Users\my_name\Lib\site-packages

(请注意,我预先安装了正确运行的散景版本“0.12.11”)

当我跑步时

import datashader as ds

在 jupyter notebook 中,我得到一个错误。从 PIL\Image.py 导入 _imaging 似乎有问题,但这不应该在安装中得到照顾吗?顺便说一句,我安装了 PIL 模块。版本“4.2.1”,因此它也存在于文件夹中

C:\Users\my_name\Lib\site-packages\PIL

完整的错误信息:

--------------------------------------------------------------------------- ImportError                               Traceback (most recent call last) <ipython-input-1-236dc39df287> in <module>()
----> 1 import datashader as ds

C:\Users\my_name\lib\site-packages\datashader\__init__.py in <module>()
      7                          mean, std, var, count_cat, summary)
      8 from .glyphs import Point                                # noqa (API import)
----> 9 from .pipeline import Pipeline                           # noqa (API import)
     10 from . import transfer_functions as tf                   # noqa (API import)
     11 

C:\Users\my_name\lib\site-packages\datashader\pipeline.py in <module>()
      3 from toolz import identity
      4 
----> 5 from . import transfer_functions as tf
      6 from . import reductions
      7 from . import core

C:\Users\my_name\lib\site-packages\datashader\transfer_functions.py in <module>()
      8 import toolz as tz
      9 import xarray as xr
---> 10 from PIL.Image import fromarray
     11 
     12 

C:\Users\my_name\lib\site-packages\PIL\Image.py in <module>()
     54     # Also note that Image.core is not a publicly documented interface,
     55     # and should be considered private and subject to change.
---> 56     from . import _imaging as core
     57     if PILLOW_VERSION != getattr(core, 'PILLOW_VERSION', None):
     58         raise ImportError("The _imaging extension was built for another "

ImportError: DLL load failed: Kan opgegeven module niet vinden.
4

0 回答 0