항상 konlpy를 설치할 때면 오류가 난다..... 오늘은 새로 만난 오류이다.. 띠요옹... 먼저, Anaconda에서 가상 환경을 생성하였고 생성한 가상 환경에 konlpy 설치 시도를 하였다.
(gensim_packs) C:\Users\LG>pip install konlpy
그리고 발생한 오류. 해시값이 일치하지 않는다고....
Collecting konlpy
Downloading konlpy-0.5.2-py2.py3-none-any.whl (19.4 MB)
|████████████████████████████████| 19.4 MB 819 kB/s eta 0:00:01
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
konlpy from https://files.pythonhosted.org/packages/85/0e/f385566fec837c0b83f216b2da65db9997b35dd675e107752005b7d392b1/konlpy-0.5.2-py2.py3-none-any.whl#sha256=65ab33ad28fb072306e44128ff3f23b5771d97d6501fa995511834ba8dd2bd40:
Expected sha256 65ab33ad28fb072306e44128ff3f23b5771d97d6501fa995511834ba8dd2bd40
Got 47430be567ed6661ac89c05c43f6d4a6ad61b9f6cead197ba92e083af906dd83
해결법은 jpype1를 먼저 설치해주는 것이다. (설치 결과 생략)
(gensim_packs) C:\Users\LG>conda install -c conda-forge jpype1
Collecting package metadata (current_repodata.json): done
Solving environment: done
다시 konlpy를 설치해준다.
(gensim_packs) C:\Users\LG>pip install konlpy
Collecting konlpy
Downloading konlpy-0.5.2-py2.py3-none-any.whl (19.4 MB)
|████████████████████████████████| 19.4 MB 327 kB/s
Collecting tweepy>=3.7.0
Downloading tweepy-3.8.0-py2.py3-none-any.whl (28 kB)
Collecting beautifulsoup4==4.6.0
Downloading beautifulsoup4-4.6.0-py3-none-any.whl (86 kB)
|████████████████████████████████| 86 kB 578 kB/s
Collecting colorama
Downloading colorama-0.4.3-py2.py3-none-any.whl (15 kB)
Requirement already satisfied: JPype1>=0.7.0 in c:\users\lg\anaconda3\envs\gensim_packs\lib\site-packages (from konlpy) (0.7.5)
Requirement already satisfied: numpy>=1.6 in c:\users\lg\anaconda3\envs\gensim_packs\lib\site-packages (from konlpy) (1.18.5)
Collecting lxml>=4.1.0
Downloading lxml-4.5.1-cp37-cp37m-win_amd64.whl (3.5 MB)
|████████████████████████████████| 3.5 MB 386 kB/s
Requirement already satisfied: PySocks>=1.5.7 in c:\users\lg\anaconda3\envs\gensim_packs\lib\site-packages (from tweepy>=3.7.0->konlpy) (1.7.1)
Requirement already satisfied: requests>=2.11.1 in c:\users\lg\anaconda3\envs\gensim_packs\lib\site-packages (from tweepy>=3.7.0->konlpy) (2.24.0)
Collecting requests-oauthlib>=0.7.0
Downloading requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB)
Requirement already satisfied: six>=1.10.0 in c:\users\lg\anaconda3\envs\gensim_packs\lib\site-packages (from tweepy>=3.7.0->konlpy) (1.15.0)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\lg\anaconda3\envs\gensim_packs\lib\site-packages (from requests>=2.11.1->tweepy>=3.7.0->konlpy) (2020.6.20)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\lg\anaconda3\envs\gensim_packs\lib\site-packages (from requests>=2.11.1->tweepy>=3.7.0->konlpy) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\lg\anaconda3\envs\gensim_packs\lib\site-packages (from requests>=2.11.1->tweepy>=3.7.0->konlpy) (1.25.9)
Requirement already satisfied: idna<3,>=2.5 in c:\users\lg\anaconda3\envs\gensim_packs\lib\site-packages (from requests>=2.11.1->tweepy>=3.7.0->konlpy) (2.10)
Collecting oauthlib>=3.0.0
Downloading oauthlib-3.1.0-py2.py3-none-any.whl (147 kB)
|████████████████████████████████| 147 kB 409 kB/s
Installing collected packages: oauthlib, requests-oauthlib, tweepy, beautifulsoup4, colorama, lxml, konlpy
Successfully installed beautifulsoup4-4.6.0 colorama-0.4.3 konlpy-0.5.2 lxml-4.5.1 oauthlib-3.1.0 requests-oauthlib-1.3.0 tweepy-3.8.0
마지막으로 잘 설치가 되었는지 확인하기!
(gensim_packs) C:\Users\LG>python
Python 3.7.7 (default, May 6 2020, 11:45:54) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from konlpy.tag import Kkma
>>> from konlpy.utils import pprint
>>> kkma = Kkma()
>>> pprint(kkma.sentences(u'네, 안녕하세요. 반갑습니다.'))
['네, 안녕하세요.', '반갑습니다.']
'Python > 기본' 카테고리의 다른 글
[ERROR] Microsoft Visual C++ 14.0 is required. (0) | 2020.05.30 |
---|