0

I am trying to use wordcloud in python. The first step is to install it using pip. I used

    pip install wordcloud

However, I get the following error:


    Installing collected packages: wordcloud
        Running setup.py install for wordcloud ... error
        ERROR: Command errored out with exit status 1:
         command: 'c:\users\victor\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Victor\\AppData\\Local\\Temp\\pip-install-_h6d4rlc\\wordcloud\\setup.py'"'"'; __file__='"'"'C:\\Users\\Victor\\AppData\\Local\\Temp\\pip-install-_h6d4rlc\\wordcloud\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Victor\AppData\Local\Temp\pip-record-3nmx14vv\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\victor\appdata\local\programs\python\python38-32\Include\wordcloud'
             cwd: C:\Users\Victor\AppData\Local\Temp\pip-install-_h6d4rlc\wordcloud\
        Complete output (20 lines):
        running install
        running build
        running build_py
        creating build
        creating build\lib.win32-3.8
        creating build\lib.win32-3.8\wordcloud
        copying wordcloud\color_from_image.py -> build\lib.win32-3.8\wordcloud
        copying wordcloud\tokenization.py -> build\lib.win32-3.8\wordcloud
        copying wordcloud\wordcloud.py -> build\lib.win32-3.8\wordcloud
        copying wordcloud\wordcloud_cli.py -> build\lib.win32-3.8\wordcloud
        copying wordcloud\_version.py -> build\lib.win32-3.8\wordcloud
        copying wordcloud\__init__.py -> build\lib.win32-3.8\wordcloud
        copying wordcloud\__main__.py -> build\lib.win32-3.8\wordcloud
        copying wordcloud\stopwords -> build\lib.win32-3.8\wordcloud
        copying wordcloud\DroidSansMono.ttf -> build\lib.win32-3.8\wordcloud
        UPDATING build\lib.win32-3.8\wordcloud/_version.py
        set build\lib.win32-3.8\wordcloud/_version.py to '1.6.0'
        running build_ext
        building 'wordcloud.query_integral_image' extension
        error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
        ----------------------------------------
    ERROR: Command errored out with exit status 1: 'c:\users\victor\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Victor\\AppData\\Local\\Temp\\pip-install-_h6d4rlc\\wordcloud\\setup.py'"'"'; __file__='"'"'C:\\Users\\Victor\\AppData\\Local\\Temp\\pip-install-_h6d4rlc\\wordcloud\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Victor\AppData\Local\Temp\pip-record-3nmx14vv\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\victor\appdata\local\programs\python\python38-32\Include\wordcloud' Check the logs for full command output.

The following are installed:

Visual Studio 2019

Microsoft Visual C++ 2008 Redistributable - x86

Microsoft Visual C++ 2013 Redistributable - (x64)

Microsoft Visual C++ 2013 Redistributable - (x86)

Microsoft Visual C++ 2015-2019 Redistributable (x64)

vestrad
  • 9
  • 1
  • 2
  • You need _Build Tools_, not _Redistributable_. – hoefling Mar 03 '20 at 17:19
  • I downloaded it from [here](https://www.microsoft.com/en-us/download/confirmation.aspx?id=48159), installed it, and I'm still getting the error. – vestrad Mar 03 '20 at 17:52
  • If you have little experience with installing and setting up the compiler, I suggest you to download prebuilt packages from [here](https://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud) (from your log, it looks like you'll need the `wordcloud‑1.6.0‑cp38‑cp38‑win32.whl`) and install from it via `pip install c:\path\to\wordcloud.whl`. – hoefling Mar 03 '20 at 18:20
  • [This link](https://stackoverflow.com/questions/29846087/microsoft-visual-c-14-0-is-required-unable-to-find-vcvarsall-bat) solved it! wordcloud installed properly. Thanks! – vestrad Mar 03 '20 at 18:36

0 Answers0