我是靠谱客的博主 可耐超短裙,最近开发中收集的这篇文章主要介绍Python中wordcloud安装失败的准确解决方案,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

关于python作词云的时候wordcloud加载失败的问题终于得以解决了

可能你遇见过以下的一些报错(这些都不重要,看最后):

Collecting WordCloud
  Using cached https://files.pythonhosted.org/packages/d4/95/d260ce89441d1f28192fa5a0a016f547829517b11cabe0079ab91c56f6cd/wordcloud-1.5.0.tar.gz
Requirement already satisfied: numpy>=1.6.1 in d:pylibsite-packages (from WordCloud) (1.16.4)
Requirement already satisfied: pillow in d:pylibsite-packages (from WordCloud) (6.2.1)
Building wheels for collected packages: WordCloud
  Building wheel for WordCloud (setup.py): started
  Building wheel for WordCloud (setup.py): finished with status 'error'
  Running setup.py clean for WordCloud
Failed to build WordCloud
Installing collected packages: WordCloud
    Running setup.py install for WordCloud: started
    Running setup.py install for WordCloud: finished with status 'error'

  ERROR: Command errored out with exit status 1:
   command: 'D:pypython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\WordCloud\setup.py'"'"'; __file__='"'"'C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\WordCloud\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:UsersADMINI~2AppDataLocalTemppip-wheel-kf7ybtbx' --python-tag cp37
       cwd: C:UsersAdministratorAppDataLocalTemppycharm-packagingWordCloud
  Complete output (24 lines):
  D:pylibdistutilsdist.py:274: UserWarning: Unknown distribution option: 'test_requires'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating buildlib.win32-3.7
  creating buildlib.win32-3.7wordcloud
  copying wordcloudcolor_from_image.py -> buildlib.win32-3.7wordcloud
  copying wordcloudtokenization.py -> buildlib.win32-3.7wordcloud
  copying wordcloudwordcloud.py -> buildlib.win32-3.7wordcloud
  copying wordcloudwordcloud_cli.py -> buildlib.win32-3.7wordcloud
  copying wordcloud_version.py -> buildlib.win32-3.7wordcloud
  copying wordcloud__init__.py -> buildlib.win32-3.7wordcloud
  copying wordcloud__main__.py -> buildlib.win32-3.7wordcloud
  copying wordcloudstopwords -> buildlib.win32-3.7wordcloud
  copying wordcloudDroidSansMono.ttf -> buildlib.win32-3.7wordcloud
  warning: cmd_build_py: byte-compiling is disabled, skipping.
  
  UPDATING buildlib.win32-3.7wordcloud/_version.py
  set buildlib.win32-3.7wordcloud/_version.py to '1.5.0'
  running build_ext
  building 'wordcloud.query_integral_image' extension
  error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
  ----------------------------------------
  ERROR: Failed building wheel for WordCloud
    ERROR: Command errored out with exit status 1:
     command: 'D:pypython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\WordCloud\setup.py'"'"'; __file__='"'"'C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\WordCloud\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersADMINI~2AppDataLocalTemppip-record-4oz633vzinstall-record.txt' --single-version-externally-managed --compile
         cwd: C:UsersAdministratorAppDataLocalTemppycharm-packagingWordCloud
    Complete output (24 lines):
    D:pylibdistutilsdist.py:274: UserWarning: Unknown distribution option: 'test_requires'
      warnings.warn(msg)
    running install
    running build
    running build_py
    creating build
    creating buildlib.win32-3.7
    creating buildlib.win32-3.7wordcloud
    copying wordcloudcolor_from_image.py -> buildlib.win32-3.7wordcloud
    copying wordcloudtokenization.py -> buildlib.win32-3.7wordcloud
    copying wordcloudwordcloud.py -> buildlib.win32-3.7wordcloud
    copying wordcloudwordcloud_cli.py -> buildlib.win32-3.7wordcloud
    copying wordcloud_version.py -> buildlib.win32-3.7wordcloud
    copying wordcloud__init__.py -> buildlib.win32-3.7wordcloud
    copying wordcloud__main__.py -> buildlib.win32-3.7wordcloud
    copying wordcloudstopwords -> buildlib.win32-3.7wordcloud
    copying wordcloudDroidSansMono.ttf -> buildlib.win32-3.7wordcloud
    warning: cmd_build_py: byte-compiling is disabled, skipping.
    
    UPDATING buildlib.win32-3.7wordcloud/_version.py
    set buildlib.win32-3.7wordcloud/_version.py to '1.5.0'
    running build_ext
    building 'wordcloud.query_integral_image' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'D:pypython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\WordCloud\setup.py'"'"'; __file__='"'"'C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\WordCloud\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersADMINI~2AppDataLocalTemppip-record-4oz633vzinstall-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool

 

里面提到:Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools",实际上并不需要。

仅需下载对应于你安装的python版本的wordcloud-1.5.0-cp36-cp36m-win32.whl文件,放在你python的安装目录后进行安装pip install wordcloud-1.5.0-cp36-cp36m-win32.whl,接下来就可以直接安装wordcloud了

最后

以上就是可耐超短裙为你收集整理的Python中wordcloud安装失败的准确解决方案的全部内容,希望文章能够帮你解决Python中wordcloud安装失败的准确解决方案所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(52)

评论列表共有 0 条评论

立即
投稿
返回
顶部