error見たら書いてありますが、エラーの見方わからずちょっと時間かかったのでメモ
実行したのはこれで
pip install wordcloud
下記のエラーがでました。
Collecting wordcloud
Using cached wordcloud-1.8.1.tar.gz (220 kB)
Requirement already satisfied: numpy>=1.6.1 in c:\users\s6356\anaconda3\envs\flask\lib\site-packages (from wordcloud) (1.21.1)
Requirement already satisfied: pillow in c:\users\s6356\anaconda3\envs\flask\lib\site-packages (from wordcloud) (8.3.1)
Requirement already satisfied: matplotlib in c:\users\s6356\anaconda3\envs\flask\lib\site-packages (from wordcloud) (3.4.2)
Requirement already satisfied: cycler>=0.10 in c:\users\s6356\anaconda3\envs\flask\lib\site-packages (from matplotlib->wordcloud) (0.10.0)
Requirement already satisfied: pyparsing>=2.2.1 in c:\users\s6356\anaconda3\envs\flask\lib\site-packages (from matplotlib->wordcloud) (2.4.7)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\s6356\anaconda3\envs\flask\lib\site-packages (from matplotlib->wordcloud) (2.8.2)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\s6356\anaconda3\envs\flask\lib\site-packages (from matplotlib->wordcloud) (1.3.1)
Requirement already satisfied: six in c:\users\s6356\anaconda3\envs\flask\lib\site-packages (from cycler>=0.10->matplotlib->wordcloud) (1.16.0)
Building wheels for collected packages: wordcloud
Building wheel for wordcloud (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\s6356\anaconda3\envs\flask\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\s6356\\AppData\\Local\\Temp\\pip-install-8fftqxk6\\wordcloud_1209aaa63a3e49c08419c2caf5df0566\\setup.py'"'"'; __file__='"'"'C:\\Users\\s6356\\AppData\\Local\\Temp\\pip-install-8fftqxk6\\wordcloud_1209aaa63a3e49c08419c2caf5df0566\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\s6356\AppData\Local\Temp\pip-wheel-21i2cbny'
cwd: C:\Users\s6356\AppData\Local\Temp\pip-install-8fftqxk6\wordcloud_1209aaa63a3e49c08419c2caf5df0566\
Complete output (20 lines):
running bdist_wheel
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.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for wordcloud
Running setup.py clean for wordcloud
Failed to build wordcloud
Installing collected packages: wordcloud
Running setup.py install for wordcloud ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\s6356\anaconda3\envs\flask\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\s6356\\AppData\\Local\\Temp\\pip-install-8fftqxk6\\wordcloud_1209aaa63a3e49c08419c2caf5df0566\\setup.py'"'"'; __file__='"'"'C:\\Users\\s6356\\AppData\\Local\\Temp\\pip-install-8fftqxk6\\wordcloud_1209aaa63a3e49c08419c2caf5df0566\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else 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\s6356\AppData\Local\Temp\pip-record-kqkojxny\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\s6356\anaconda3\envs\flask\Include\wordcloud'
cwd: C:\Users\s6356\AppData\Local\Temp\pip-install-8fftqxk6\wordcloud_1209aaa63a3e49c08419c2caf5df0566\
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.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\s6356\anaconda3\envs\flask\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\s6356\\AppData\\Local\\Temp\\pip-install-8fftqxk6\\wordcloud_1209aaa63a3e49c08419c2caf5df0566\\setup.py'"'"'; __file__='"'"'C:\\Users\\s6356\\AppData\\Local\\Temp\\pip-install-8fftqxk6\\wordcloud_1209aaa63a3e49c08419c2caf5df0566\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else 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\s6356\AppData\Local\Temp\pip-record-kqkojxny\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\s6356\anaconda3\envs\flask\Include\wordcloud' Check the logs for full command output.
重要なのはここでした。
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
このサイトに入ってインストールしていきます。
よくわからないままデフォルトのままインストールしたら解決しました。