使用Jupyter Notebook(Python)导入wordcloud

时间:2018-04-04 09:40:38

标签: python dll jupyter-notebook word-cloud

我正在使用jupyter Notebook(conda root)。我正在运行的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.**

任何人都可以解释这个错误是什么? 我需要使用世界云作为我的家庭作业

1 个答案:

答案 0 :(得分:0)

你有部分python Pillow模块的问题:有一个从_imaging.c构建的库。尝试从Pillow包重新安装python .exe模块,而不是pip