0

While Installing the wordcloud library, I encountered an error: "Command errored out with exit status 1:" I tried different answers already available on questions similar to this but was not able to solve the error. The exact error is:

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.

Can somebody please tell me what's the error and how do you find that?

  • https://stackoverflow.com/search?tab=newest&q=%5bpip%5d%20error%3a%20Microsoft%20Visual%20C%2b%2b%2014.0%20or%20greater%20is%20required – phd Aug 15 '21 at 20:33

1 Answers1

2

From what I can see from your error message is that you're missing c++ build tools. You should be able to download them from https://visualstudio.microsoft.com/visual-cpp-build-tools/.

Yahya
  • 36
  • 2