인프런 커뮤니티 질문&답변

joonhye moon님의 프로필 이미지
joonhye moon

작성한 질문수

파이썬 텍스트 분석 입문 - 데이터 수집부터 분석까지

konlpy 설치에서 막혀서 더 이상 진도가 안나갑니다

작성

·

557

0

컴퓨터를 새로 구입해서 설치하고 있는데, jpype1~파일을 다운받으려니까 앱을 선택하라고 나와요. 메모장을 선택하고 진행했는데 안됩니다. 도와주세요

답변 2

0

joonhye moon님의 프로필 이미지
joonhye moon
질문자

감사합니다. 알려주신ㄴ대로 진행하여 konlpy 설치는 성공했는데, 그 다음이 진행되지 않아요. 

Collecting konlpy
  Downloading konlpy-0.5.2-py2.py3-none-any.whl (19.4 MB)
Collecting beautifulsoup4==4.6.0
  Downloading beautifulsoup4-4.6.0-py3-none-any.whl (86 kB)
Requirement already satisfied: JPype1>=0.7.0 in c:\users\samsung\anaconda3\lib\site-packages (from konlpy) (1.1.2)
Requirement already satisfied: lxml>=4.1.0 in c:\users\samsung\anaconda3\lib\site-packages (from konlpy) (4.6.1)
Collecting tweepy>=3.7.0
  Downloading tweepy-3.10.0-py2.py3-none-any.whl (30 kB)
Requirement already satisfied: numpy>=1.6 in c:\users\samsung\anaconda3\lib\site-packages (from konlpy) (1.19.2)
Requirement already satisfied: colorama in c:\users\samsung\anaconda3\lib\site-packages (from konlpy) (0.4.4)
Requirement already satisfied: six>=1.10.0 in c:\users\samsung\anaconda3\lib\site-packages (from tweepy>=3.7.0->konlpy) (1.15.0)
Requirement already satisfied: requests[socks]>=2.11.1 in c:\users\samsung\anaconda3\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: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\samsung\anaconda3\lib\site-packages (from requests[socks]>=2.11.1->tweepy>=3.7.0->konlpy) (1.25.11)
Requirement already satisfied: idna<3,>=2.5 in c:\users\samsung\anaconda3\lib\site-packages (from requests[socks]>=2.11.1->tweepy>=3.7.0->konlpy) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\samsung\anaconda3\lib\site-packages (from requests[socks]>=2.11.1->tweepy>=3.7.0->konlpy) (2020.6.20)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\samsung\anaconda3\lib\site-packages (from requests[socks]>=2.11.1->tweepy>=3.7.0->konlpy) (3.0.4)
Requirement already satisfied: PySocks!=1.5.7,>=1.5.6; extra == "socks" in c:\users\samsung\anaconda3\lib\site-packages (from requests[socks]>=2.11.1->tweepy>=3.7.0->konlpy) (1.7.1)
Collecting oauthlib>=3.0.0
  Downloading oauthlib-3.1.0-py2.py3-none-any.whl (147 kB)
Installing collected packages: beautifulsoup4, oauthlib, requests-oauthlib, tweepy, konlpy
  Attempting uninstall: beautifulsoup4
    Found existing installation: beautifulsoup4 4.9.3
    Uninstalling beautifulsoup4-4.9.3:
      Successfully uninstalled beautifulsoup4-4.9.3
Successfully installed beautifulsoup4-4.6.0 konlpy-0.5.2 oauthlib-3.1.0 requests-oauthlib-1.3.0 tweepy-3.10.0

그리고 나서 from~으로 진행했는데,
---------------------------------------------------------------------------
JVMNotFoundException                      Traceback (most recent call last)
<ipython-input-6-d574e370b2da> in <module>
      1 from konlpy.tag import Okt
----> 2 okt = Okt()
      3 okt.pos("konlpy의 설치를 성공적으로 마쳤습니다.")

~\anaconda3\lib\site-packages\konlpy\tag\_okt.py in __init__(self, jvmpath, max_heap_size)
     89     def __init__(self, jvmpath=None, max_heap_size=1024):
     90         if not jpype.isJVMStarted():
---> 91             jvm.init_jvm(jvmpath, max_heap_size)
     92 
     93         oktJavaPackage = jpype.JPackage('kr.lucypark.okt')

~\anaconda3\lib\site-packages\konlpy\jvm.py in init_jvm(jvmpath, max_heap_size)
     53     classpath = os.pathsep.join(f.format(*args) for f in folder_suffix)
     54 
---> 55     jvmpath = jvmpath or jpype.getDefaultJVMPath()
     56 
     57     # NOTE: Temporary patch for Issue #76. Erase when possible.

~\anaconda3\lib\site-packages\jpype\_jvmfinder.py in getDefaultJVMPath()
     72     else:
     73         finder = LinuxJVMFinder()
---> 74     return finder.get_jvm_path()
     75 
     76 

~\anaconda3\lib\site-packages\jpype\_jvmfinder.py in get_jvm_path(self)
    210         if jvm_notsupport_ext is not None:
    211             raise jvm_notsupport_ext
--> 212         raise JVMNotFoundException("No JVM shared library file ({0}) "
    213                                    "found. Try setting up the JAVA_HOME "
    214                                    "environment variable properly."

JVMNotFoundException: No JVM shared library file (jvm.dll) found. Try setting up the JAVA_HOME environment variable properly.

이렇게 나옵니다.

0

My Incizor님의 프로필 이미지
My Incizor
지식공유자

안녕하십니까, 인사이저 입니다.

질문에 답변 드리겠습니다.

정보가 부족하기에 저희도 좀 더 조사해봐야겠지만

설명해주신 내용을 보고 판단하건데,

jpype 파일을 더블클릭해서 열려고 시도하신 것으로 보입니다. 

jpype 파일은 파이썬, 즉 아나콘다 주피터로 들어가서 설치해야 합니다.

아래에 jpype 설치 방법을 스크린샷으로 첨부하였으니

한번 확인해보시고,

그래도 문제가 생긴다면 다시 문의해주세요!

감사합니다.

joonhye moon님의 프로필 이미지
joonhye moon
질문자

konlpy 설치를 성공했는데, 그 다음이 진행되지 않아요. 

Collecting konlpy
  Downloading konlpy-0.5.2-py2.py3-none-any.whl (19.4 MB)
Collecting beautifulsoup4==4.6.0
  Downloading beautifulsoup4-4.6.0-py3-none-any.whl (86 kB)
Requirement already satisfied: JPype1>=0.7.0 in c:\users\samsung\anaconda3\lib\site-packages (from konlpy) (1.1.2)
Requirement already satisfied: lxml>=4.1.0 in c:\users\samsung\anaconda3\lib\site-packages (from konlpy) (4.6.1)
Collecting tweepy>=3.7.0
  Downloading tweepy-3.10.0-py2.py3-none-any.whl (30 kB)
Requirement already satisfied: numpy>=1.6 in c:\users\samsung\anaconda3\lib\site-packages (from konlpy) (1.19.2)
Requirement already satisfied: colorama in c:\users\samsung\anaconda3\lib\site-packages (from konlpy) (0.4.4)
Requirement already satisfied: six>=1.10.0 in c:\users\samsung\anaconda3\lib\site-packages (from tweepy>=3.7.0->konlpy) (1.15.0)
Requirement already satisfied: requests[socks]>=2.11.1 in c:\users\samsung\anaconda3\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: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\samsung\anaconda3\lib\site-packages (from requests[socks]>=2.11.1->tweepy>=3.7.0->konlpy) (1.25.11)
Requirement already satisfied: idna<3,>=2.5 in c:\users\samsung\anaconda3\lib\site-packages (from requests[socks]>=2.11.1->tweepy>=3.7.0->konlpy) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\samsung\anaconda3\lib\site-packages (from requests[socks]>=2.11.1->tweepy>=3.7.0->konlpy) (2020.6.20)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\samsung\anaconda3\lib\site-packages (from requests[socks]>=2.11.1->tweepy>=3.7.0->konlpy) (3.0.4)
Requirement already satisfied: PySocks!=1.5.7,>=1.5.6; extra == "socks" in c:\users\samsung\anaconda3\lib\site-packages (from requests[socks]>=2.11.1->tweepy>=3.7.0->konlpy) (1.7.1)
Collecting oauthlib>=3.0.0
  Downloading oauthlib-3.1.0-py2.py3-none-any.whl (147 kB)
Installing collected packages: beautifulsoup4, oauthlib, requests-oauthlib, tweepy, konlpy
  Attempting uninstall: beautifulsoup4
    Found existing installation: beautifulsoup4 4.9.3
    Uninstalling beautifulsoup4-4.9.3:
      Successfully uninstalled beautifulsoup4-4.9.3
Successfully installed beautifulsoup4-4.6.0 konlpy-0.5.2 oauthlib-3.1.0 requests-oauthlib-1.3.0 tweepy-3.10.0

그리고 나서 from~으로 진행했는데,
---------------------------------------------------------------------------
JVMNotFoundException                      Traceback (most recent call last)
<ipython-input-6-d574e370b2da> in <module>
      1 from konlpy.tag import Okt
----> 2 okt = Okt()
      3 okt.pos("konlpy의 설치를 성공적으로 마쳤습니다.")

~\anaconda3\lib\site-packages\konlpy\tag\_okt.py in __init__(self, jvmpath, max_heap_size)
     89     def __init__(self, jvmpath=None, max_heap_size=1024):
     90         if not jpype.isJVMStarted():
---> 91             jvm.init_jvm(jvmpath, max_heap_size)
     92 
     93         oktJavaPackage = jpype.JPackage('kr.lucypark.okt')

~\anaconda3\lib\site-packages\konlpy\jvm.py in init_jvm(jvmpath, max_heap_size)
     53     classpath = os.pathsep.join(f.format(*args) for f in folder_suffix)
     54 
---> 55     jvmpath = jvmpath or jpype.getDefaultJVMPath()
     56 
     57     # NOTE: Temporary patch for Issue #76. Erase when possible.

~\anaconda3\lib\site-packages\jpype\_jvmfinder.py in getDefaultJVMPath()
     72     else:
     73         finder = LinuxJVMFinder()
---> 74     return finder.get_jvm_path()
     75 
     76 

~\anaconda3\lib\site-packages\jpype\_jvmfinder.py in get_jvm_path(self)
    210         if jvm_notsupport_ext is not None:
    211             raise jvm_notsupport_ext
--> 212         raise JVMNotFoundException("No JVM shared library file ({0}) "
    213                                    "found. Try setting up the JAVA_HOME "
    214                                    "environment variable properly."

JVMNotFoundException: No JVM shared library file (jvm.dll) found. Try setting up the JAVA_HOME environment variable properly.

이렇게 나옵니다.

In [ ]:
joonhye moon님의 프로필 이미지
joonhye moon

작성한 질문수

질문하기