0

Apologies, I previously posted a similar question this morning, but I have a more refined list of solutions I have attempted.

My first sanity check was to try to pip install wordcloud on my Mac work laptop which has python2, python3 and anaconda installed. It worked in like 10 seconds.

I uninstalled Python2, Python3 and anaconda from my windows PC. Reinstalled Python3 and made sure the path was set. Tried pip install wordcloud, I get this error:

C:\Users\ghodg> pip install wordcloud
Collecting wordcloud
  Using cached wordcloud-1.3.1.tar.gz
Requirement already satisfied: matplotlib in c:\users\ghodg\appdata\roaming\python\python36\site-packages (from wordclou
d)
Requirement already satisfied: numpy>=1.6.1 in c:\users\ghodg\appdata\local\programs\python\python36-32\lib\site-package
s (from wordcloud)
Requirement already satisfied: pillow in c:\users\ghodg\appdata\roaming\python\python36\site-packages (from wordcloud)
Requirement already satisfied: six>=1.10 in c:\users\ghodg\appdata\local\programs\python\python36-32\lib\site-packages (
from matplotlib->wordcloud)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\ghodg\appdata\roaming\python\python3
6\site-packages (from matplotlib->wordcloud)
Requirement already satisfied: python-dateutil>=2.0 in c:\users\ghodg\appdata\local\programs\python\python36-32\lib\site
-packages (from matplotlib->wordcloud)
Requirement already satisfied: pytz in c:\users\ghodg\appdata\local\programs\python\python36-32\lib\site-packages (from
matplotlib->wordcloud)
Requirement already satisfied: cycler>=0.10 in c:\users\ghodg\appdata\roaming\python\python36\site-packages (from matplo
tlib->wordcloud)
Requirement already satisfied: olefile in c:\users\ghodg\appdata\roaming\python\python36\site-packages (from pillow->wor
dcloud)
Installing collected packages: wordcloud
  Running setup.py install for wordcloud ... error
    Complete output from command c:\users\ghodg\appdata\local\programs\python\python36-32\python.exe -u -c "import setup
tools, tokenize;__file__='C:\\Users\\ghodg\\AppData\\Local\\Temp\\pip-build-pg6zztjv\\wordcloud\\setup.py';f=getattr(tok
enize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" inst
all --record C:\Users\ghodg\AppData\Local\Temp\pip-nq0gfgxv-record\install-record.txt --single-version-externally-manage
d --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.6
    creating build\lib.win32-3.6\wordcloud
    copying wordcloud\color_from_image.py -> build\lib.win32-3.6\wordcloud
    copying wordcloud\tokenization.py -> build\lib.win32-3.6\wordcloud
    copying wordcloud\wordcloud.py -> build\lib.win32-3.6\wordcloud
    copying wordcloud\wordcloud_cli.py -> build\lib.win32-3.6\wordcloud
    copying wordcloud\__init__.py -> build\lib.win32-3.6\wordcloud
    copying wordcloud\stopwords -> build\lib.win32-3.6\wordcloud
    copying wordcloud\DroidSansMono.ttf -> build\lib.win32-3.6\wordcloud
    running build_ext
    building 'wordcloud.query_integral_image' extension
    creating build\temp.win32-3.6
    creating build\temp.win32-3.6\Release
    creating build\temp.win32-3.6\Release\wordcloud
    cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\ghodg\appdata\local\programs\python\python36-32\include -Ic:\u
sers\ghodg\appdata\local\programs\python\python36-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\I
NCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\
include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\includ
e\winrt" /Tcwordcloud/query_integral_image.c /Fobuild\temp.win32-3.6\Release\wordcloud/query_integral_image.obj
    error: command 'cl.exe' failed: No such file or directory

Command "c:\users\ghodg\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\Users\ghodg\AppData\Local\Temp\pip-build-pg6zztjv\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\ghodg\AppData\Local\Temp\pip-nq0gfgxv-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\ghodg\AppData\Local\Temp\pip-build-pg6zztjv\wordcloud\

Reinstalled anaconda. Then tried conda install -c https://conda.anaconda.org/amueller wordcloud. Also didn't work. Even DL'ed the .whl file for the correct version of Python, didn't work. Reinstalled Python2. Made sure visual tools was updated. Made sure pip install was updated.

Working in powershell now scipy, pandas, sqlalchemy, and a few others worked with pip install.

phd
  • 69,888
  • 11
  • 97
  • 133
Greg Hodgson
  • 11
  • 1
  • 6
  • https://stackoverflow.com/questions/41724445/python-pip-on-windows-command-cl-exe-failed – Thomas Junk Nov 11 '17 at 21:53
  • Stumbled on that solution earlier. They stated just opening the visual tours command prompt would set the PATH. But even when navigating to the folder I can't seem to find the cl.exe file...I may not be understanding this process completely... – Greg Hodgson Nov 11 '17 at 22:07
  • 1
    `command 'cl.exe' failed: No such file or directory` this is the most likely cause of your problem. In order to solve your prblem you have to manage to install a proper build environment. – Thomas Junk Nov 11 '17 at 22:10

0 Answers0