miaofeng520 2022-03-21 08:24 采纳率: 100%
浏览 11341
已结题

Python 安装wordcloud时报错 legacy-install-failure

电脑安装wordcloud时下载到一半手动停掉了,再次重新下载安装时就出现legacy-install-failure的问题。

Installing collected packages: six, pyparsing, pillow, numpy, kiwisolver, fonttools, cycler, python- dateutil, packaging, matplotlib, 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.10
creating build\lib.win-amd64-3.10\wordcloud
copying wordcloud\color_from_image.py -> build\lib.win-amd64-3.10\wordcloud
copying wordcloud\tokenization.py -> build\lib.win-amd64-3.10\wordcloud
copying wordcloud\wordcloud.py -> build\lib.win-amd64-3.10\wordcloud
copying wordcloud\wordcloud_cli.py -> build\lib.win-amd64-3.10\wordcloud
copying wordcloud_version.py -> build\lib.win-amd64-3.10\wordcloud
copying wordcloud_init.py -> build\lib.win-amd64-3.10\wordcloud
copying wordcloud_main
.py -> build\lib.win-amd64-3.10\wordcloud
copying wordcloud\stopwords -> build\lib.win-amd64-3.10\wordcloud
copying wordcloud\DroidSansMono.ttf -> build\lib.win-amd64-3.10\wordcloud
UPDATING build\lib.win-amd64-3.10\wordcloud/_version.py
set build\lib.win-amd64-3.10\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 Tool s": 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.

尝试重新安装 pip install wordcloud,问题还是同样存在。

img

希望有人能帮忙看看要怎么样才可以解决问题以成功安装,谢谢!

  • 写回答

4条回答 默认 最新

  • 关注

    可以去官网手动下载对应版本的wordcloud 的whl文件,


    然后,在cmd命令行中,进入刚刚下载的文件的路径,使用
    pip install wordcloud-1.3.3-cp36-cp36m-win_amd64.whl 命令开始安装(后面是你对应下载版本的名称)

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

报告相同问题?

问题事件

  • 系统已结题 3月29日
  • 已采纳回答 3月21日
  • 创建了问题 3月21日

悬赏问题

  • ¥15 怎么改成循环输入删除(语言-c语言)
  • ¥15 安卓C读取/dev/fastpipe屏幕像素数据
  • ¥15 pyqt5tools安装失败
  • ¥15 mmdetection
  • ¥15 nginx代理报502的错误
  • ¥100 当AWR1843发送完设置的固定帧后,如何使其再发送第一次的帧
  • ¥15 图示五个参数的模型校正是用什么方法做出来的。如何建立其他模型
  • ¥100 描述一下元器件的基本功能,pcba板的基本原理
  • ¥15 STM32无法向设备写入固件
  • ¥15 使用ESP8266连接阿里云出现问题