鱼C论坛

 找回密码
 立即注册
查看: 1084|回复: 2

[已解决]wordcloud安装问题

[复制链接]
发表于 2020-7-27 19:42:49 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
本帖最后由 xiaosi4081 于 2020-7-27 19:46 编辑

想做个词云玩一玩,但是wordcloud模块没法安装

清华源,阿里云源都试过了,但是无济于事

这是报错:
ERROR: Command errored out with exit status 1:
   command: 'C:\Users\x4\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\x4\\AppData\\Local\\Temp\\pip-install-pu3kdl86\\wordcloud\\setup.py'"'"'; __file__='"'"'C:\\Users\\x4\\AppData\\Local\\Temp\\pip-install-pu3kdl86\\wordcloud\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\x4\AppData\Local\Temp\pip-wheel-7xswnjmd'
       cwd: C:\Users\x4\AppData\Local\Temp\pip-install-pu3kdl86\wordcloud\
  Complete output (20 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.8
  creating build\lib.win-amd64-3.8\wordcloud
  copying wordcloud\color_from_image.py -> build\lib.win-amd64-3.8\wordcloud
  copying wordcloud\tokenization.py -> build\lib.win-amd64-3.8\wordcloud
  copying wordcloud\wordcloud.py -> build\lib.win-amd64-3.8\wordcloud
  copying wordcloud\wordcloud_cli.py -> build\lib.win-amd64-3.8\wordcloud
  copying wordcloud\_version.py -> build\lib.win-amd64-3.8\wordcloud
  copying wordcloud\__init__.py -> build\lib.win-amd64-3.8\wordcloud
  copying wordcloud\__main__.py -> build\lib.win-amd64-3.8\wordcloud
  copying wordcloud\stopwords -> build\lib.win-amd64-3.8\wordcloud
  copying wordcloud\DroidSansMono.ttf -> build\lib.win-amd64-3.8\wordcloud
  UPDATING build\lib.win-amd64-3.8\wordcloud/_version.py
  set build\lib.win-amd64-3.8\wordcloud/_version.py to '1.7.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
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2020-7-27 19:45:47 | 显示全部楼层    本楼为最佳答案   
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-7-27 19:59:55 From FishC Mobile | 显示全部楼层
因为安装wordcloud时有c/c++部分源码需要在目标平台上现场编译,而你系统里又没有编译工具所以报错。解决办法如楼上,就是去下载事先编译好的包来安装,或者按照报错最后的网址去下载安装vs2019的构建工具(安装别的需要编译的库时也可以用,一劳永逸)
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-1-19 17:03

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表