miaofeng520
2022-03-21 08:24
采纳率: 100%
浏览 3.9k

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条回答 默认 最新

相关推荐 更多相似问题