繁体   English   中英

使用Jupyter Notebook(Python)导入wordcloud

[英]Importing wordcloud using Jupyter Notebook (Python)

我正在使用jupyter Notebook(conda根)。 我正在运行的python版本是2.7

我很难将wordcloud安装到我的环境中。 这是代码

from wordcloud import WordCloud

但是我得到了这个错误:

ImportErrorTraceback (most recent call last)
<ipython-input-21-8038e19af624> in <module>()
----> 1 from wordcloud import WordCloud

C:\Users\aneeq\Anaconda2\lib\site-packages\wordcloud\__init__.py in <module>()
----> 1 from .wordcloud import (WordCloud, STOPWORDS, random_color_func,
      2                         get_single_color_func)
      3 from .color_from_image import ImageColorGenerator
      4 
      5 __all__ = ['WordCloud', 'STOPWORDS', 'random_color_func',

C:\Users\aneeq\Anaconda2\lib\site-packages\wordcloud\wordcloud.py in <module>()
     17 from operator import itemgetter
     18 
---> 19 from PIL import Image
     20 from PIL import ImageColor
     21 from PIL import ImageDraw

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

**ImportError: DLL load failed: The specified module could not be found.**

谁能解释这个错误是什么? 我需要使用世界云进行作业

您对python Pillow模块的一部分存在问题:使用一个库,该库是从_imaging.c构建的。 尝试从.exe软件包而不是pip重新安装python Pillow模块。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM