728x90
- wordcloud
파이썬에선 word cloud 모듈을 제공합니다! (pypi.org/project/wordcloud/)
설치를 하기위해서
cmd창에서 Python이 설치되어 있는 경로로 찾아가서
pip install wordcloud를 합니다
하지만... 아래처럼 오류가 발생해서 설치를 못하셨다면!
Preparing metadata (setup.py) ... done Requirement already satisfied: numpy>=1.6.1 in c:\users\kmam1\appdata\local\programs\python\python311\lib\site-packages (from wordcloud) (1.24.2) Requirement already satisfied: pillow in c:\users\kmam1\appdata\local\programs\python\python311\lib\site-packages (from wordcloud) (9.4.0) Requirement already satisfied: matplotlib in c:\users\kmam1\appdata\local\programs\python\python311\lib\site-packages (from wordcloud) (3.7.1) Requirement already satisfied: contourpy>=1.0.1 in c:\users\kmam1\appdata\local\programs\python\python311\lib\site-packages (from matplotlib->wordcloud) (1.0.7) Requirement already satisfied: cycler>=0.10 in c:\users\kmam1\appdata\local\programs\python\python311\lib\site-packages (from matplotlib->wordcloud) (0.11.0) Requirement already satisfied: fonttools>=4.22.0 in c:\users\kmam1\appdata\local\programs\python\python311\lib\site-packages (from matplotlib->wordcloud) (4.39.2) Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\kmam1\appdata\local\programs\python\python311\lib\site-packages (from matplotlib->wordcloud) (1.4.4) Requirement already satisfied: packaging>=20.0 in c:\users\kmam1\appdata\local\programs\python\python311\lib\site-packages (from matplotlib->wordcloud) (23.0) Requirement already satisfied: pyparsing>=2.3.1 in c:\users\kmam1\appdata\local\programs\python\python311\lib\site-packages (from matplotlib->wordcloud) (3.0.9) Requirement already satisfied: python-dateutil>=2.7 in c:\users\kmam1\appdata\local\programs\python\python311\lib\site-packages (from matplotlib->wordcloud) (2.8.2) Requirement already satisfied: six>=1.5 in c:\users\kmam1\appdata\local\programs\python\python311\lib\site-packages (from python-dateutil>=2.7->matplotlib->wordcloud) (1.16.0) Installing collected packages: wordcloud DEPRECATION: wordcloud is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559 Running setup.py install for wordcloud ... error error: subprocess-exited-with-error × Running setup.py install for wordcloud did not run successfully. │ exit code: 1 ╰─> [22 lines of output] running install C:\Users\kmam1\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build\lib.win-amd64-cpython-311 creating build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\color_from_image.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\tokenization.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\wordcloud.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\wordcloud_cli.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\_version.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\__init__.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\__main__.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\stopwords -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\DroidSansMono.ttf -> build\lib.win-amd64-cpython-311\wordcloud UPDATING build\lib.win-amd64-cpython-311\wordcloud/_version.py set build\lib.win-amd64-cpython-311\wordcloud/_version.py to '1.9.1.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/ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure × Encountered error while trying to install package. ╰─> wordcloud note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.
다음과 같이 해주세요!
wordcloud 설치 오류가 나신 분들은 아래 링크로 들어가서 wordcloud whl 파일을 다운해주세요.
https://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud
cp뒤에 붙은 숫자는 python의 버전과 동일한 숫자로 다운받아주시고 32비트와 64비트를 잘구분해서 받아주세요:)
설치후에 다운로드 받은 파일을 파이썬폴더의 Scripts에 넣어주세요!
그후에 CMD창에서 .../Scripts까지 들어가신다음에 pip install 다운로드받은파일 을입력하고 해주시면 설치가 됩니다!
(저같은 경우는 pip install wordcloud-1.8.1-cp311-cp311-win_amd64.whl )
728x90
'3.9 기타 개발 > Python' 카테고리의 다른 글
[파이썬/코드] Scikit-learn 활용한 붓꽃 품종 예측하기 (4) | 2023.05.20 |
---|---|
[파이썬/코드] 한글 wordcloud생성하고 이미지/그래프로 응용 출력하기 (0) | 2023.05.13 |
댓글