sunflower758 2022-04-02 10:04 采纳率: 86.5%
浏览 381
已结题

安装wordcloud报错怎么破

C:\WINDOWS\system32>pip install wordcloud
Collecting wordcloud
Using cached wordcloud-1.8.1.tar.gz (220 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.6.1 in d:\programdata\anaconda3\lib\site-packages (from wordcloud) (1.20.3)
Requirement already satisfied: pillow in d:\programdata\anaconda3\lib\site-packages (from wordcloud) (8.4.0)
Requirement already satisfied: matplotlib in d:\programdata\anaconda3\lib\site-packages (from wordcloud) (3.4.3)
Requirement already satisfied: cycler>=0.10 in d:\programdata\anaconda3\lib\site-packages (from matplotlib->wordcloud) (0.10.0)
Requirement already satisfied: python-dateutil>=2.7 in d:\programdata\anaconda3\lib\site-packages (from matplotlib->wordcloud) (2.8.2)
Requirement already satisfied: kiwisolver>=1.0.1 in d:\programdata\anaconda3\lib\site-packages (from matplotlib->wordcloud) (1.3.1)
Requirement already satisfied: pyparsing>=2.2.1 in d:\programdata\anaconda3\lib\site-packages (from matplotlib->wordcloud) (3.0.4)
Requirement already satisfied: six in d:\programdata\anaconda3\lib\site-packages (from cycler>=0.10->matplotlib->wordcloud) (1.16.0)
Building wheels for collected packages: wordcloud
Building wheel for wordcloud (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\wordcloud
copying wordcloud\color_from_image.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\tokenization.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\wordcloud.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\wordcloud_cli.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud_version.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud_init.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud_main
.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\stopwords -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\DroidSansMono.ttf -> build\lib.win-amd64-3.9\wordcloud
UPDATING build\lib.win-amd64-3.9\wordcloud/_version.py
set build\lib.win-amd64-3.9\wordcloud/_version.py to '1.8.1'
running build_ext
building 'wordcloud.query_integral_image' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for wordcloud
Running setup.py clean for wordcloud
Failed to build wordcloud
Installing collected packages: wordcloud
Running setup.py install for wordcloud ... error
error: subprocess-exited-with-error

× Running setup.py install for wordcloud did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\wordcloud
copying wordcloud\color_from_image.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\tokenization.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\wordcloud.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\wordcloud_cli.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud_version.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud_init.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud_main
.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\stopwords -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\DroidSansMono.ttf -> build\lib.win-amd64-3.9\wordcloud
UPDATING build\lib.win-amd64-3.9\wordcloud/_version.py
set build\lib.win-amd64-3.9\wordcloud/_version.py to '1.8.1'
running build_ext
building 'wordcloud.query_integral_image' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> wordcloud

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

  • 写回答

4条回答 默认 最新

  • ~白+黑 Python领域新星创作者 2022-04-02 10:32
    关注

    error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

    点击那个网址,
    Microsoft C++ 生成工具
    独立 MSVC 编译器、库和脚本

    下载生成工具


    安装说明

    wordcloud 取决于 numpy和 pillow.

    要将 wordcloud 保存到文件中, matplotlib也可以安装。 请参阅 示例 。

    如果您的 python 版本没有可用的轮子,请安装 包需要设置 C 编译器。 在安装编译器之前,报告 描述正在使用的 python 和操作系统版本的问题。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

问题事件

  • 系统已结题 4月10日
  • 已采纳回答 4月2日
  • 创建了问题 4月2日

悬赏问题

  • ¥15 高通安卓11提取完整线刷包软件,或者优博讯dt50顺丰刷机包
  • ¥20 C,有个译码器,换了信道就跑不出原来数据
  • ¥15 MIMIC数据库安装问题
  • ¥60 基于JTag协议开发Fpga下载器上位机,哪位大🐂有偿指导?
  • ¥20 全书网Java爬取数据
  • ¥15 怎么获取红包封面的原始链接,并且获取红包封面序列号
  • ¥100 微信小程序跑脚本授权的问题
  • ¥100 房产抖音小程序苹果搜不到安卓可以付费悬赏
  • ¥15 STM32串口接收问题
  • ¥15 腾讯IOA系统怎么在文件夹里修改办公网络的连接