当前位置: 首页 > 知识库问答 >
问题:

如何解决安装wordcloud库[duplicate]时出现的错误:“Command errored out with exit status 1:”

彭星津
2023-03-14

在安装wordcloud库时,我遇到了一个错误:“Command errored out with exit status 1:”我对类似的问题尝试了不同的答案,但无法解决该错误。准确误差为:

ERROR: Command errored out with exit status 1:
     command: 'c:\program files\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\U
sers\\DHRUV DARDA\\AppData\\Local\\Temp\\pip-install-bkcw6x09\\wordcloud_b1d7e2d28535409aa5fec3984f9929e4\\setup.py'"'"'; __fi
le__='"'"'C:\\Users\\DHRUV DARDA\\AppData\\Local\\Temp\\pip-install-bkcw6x09\\wordcloud_b1d7e2d28535409aa5fec3984f9929e4\\setu
p.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setupto
ols import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '
"'"'exec'"'"'))' install --record 'C:\Users\DHRUV DARDA\AppData\Local\Temp\pip-record-nfojc_0x\install-record.txt' --single-ve
rsion-externally-managed --user --prefix= --compile --install-headers 'C:\Users\DHRUV DARDA\AppData\Roaming\Python\Python39\In
clude\wordcloud'
         cwd: C:\Users\DHRUV DARDA\AppData\Local\Temp\pip-install-bkcw6x09\wordcloud_b1d7e2d28535409aa5fec3984f9929e4\
    Complete output (20 lines):
    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.mic
rosoft.com/visual-cpp-build-tools/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files\python39\python.exe' -u -c 'import io, os, sys, setuptools, t
okenize; sys.argv[0] = '"'"'C:\\Users\\DHRUV DARDA\\AppData\\Local\\Temp\\pip-install-bkcw6x09\\wordcloud_b1d7e2d28535409aa5fe
c3984f9929e4\\setup.py'"'"'; __file__='"'"'C:\\Users\\DHRUV DARDA\\AppData\\Local\\Temp\\pip-install-bkcw6x09\\wordcloud_b1d7e
2d28535409aa5fec3984f9929e4\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) e
lse io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close
();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\DHRUV DARDA\AppData\Local\Temp\pip-record-nfojc_0
x\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\DHRUV DARDA\A
ppData\Roaming\Python\Python39\Include\wordcloud' Check the logs for full command output.

有人能告诉我是什么错误吗?你是怎么发现的?

共有1个答案

濮阳和泰
2023-03-14

从我从您的错误消息中看到的是,您缺少c构建工具。您应该能够从 https://visualstudio.microsoft.com/visual-cpp-build-tools/ 下载它们。

 类似资料:
  • 我要安装bzip2这个软件包,一直出现下面这个错误: 做过很多命令,包括安装那个目录,但都没有用 我希望得到解答,谢谢各位大佬

  • 我在安装ruby gem时遇到这个错误!我试图找到gem源文件,但没有用!你能告诉我如何在我的计算机上安装这些证书吗?

  • 本文向大家介绍安装Mysql时出现错误及解决办法,包括了安装Mysql时出现错误及解决办法的使用技巧和注意事项,需要的朋友参考一下 因为一时手痒痒更新了一下驱动,结果导致无线网卡出了问题。然而就算是从官网上下载了驱动各种折腾也没有弄好,心里特别堵。无奈只有重装系统这一条路了。这里表示特别难过,因为电脑上东西实在太多了,而且各种环境变量。所以建议一些对电脑特不是别精通的最好不好胡乱倒腾(像我这样的人

  • 本文向大家介绍解决python2.7用pip安装包时出现错误的问题,包括了解决python2.7用pip安装包时出现错误的问题的使用技巧和注意事项,需要的朋友参考一下 最近在使用pip安装包的的时候出现下面错误 查询资料后发现原因是pip安装python包会加载用户目录,用户目录恰好是中文的,ascii不能编码 打开对应的安装目录路径 D:\Python27\Lib\site-packages 新

  • 我在安装NPM时遇到以下错误: npm WARN Worker-Loader@0.8.1需要WebPack@>=0.9<2^2.1.0-Beta^2.2.0的对等项,但未安装任何对等项。 npm警告可选跳过可选依赖项:fsevents@1.1.2(node_modules\fsevents): npm WARN notsup跳过可选依赖项:fsevents@1.1.2:wanted平台不受支持{“