koshort / pyeunjeon

(deprecated) 은전한닢 프로젝트와 mecab 기반의 한국어 형태소 분석기의 독립형 python 인터페이스
Other
59 stars 16 forks source link

Mac - virtualenv(가상환경)에서 Mecab 경로 셋팅 #3

Open CodeMath opened 5 years ago

CodeMath commented 5 years ago

bash 로 먼저 mecab 를 설치 후, 파이썬 virtualenv 상에서 pip install eunjeon 을 설치했습니다. 그리고 나서, jupyter notebook 에서 실행하려 하니, 경로에 대해 다시 설정하라고 하더군요....

가상환경에 설치된 은전 라이브러리의 macabrc 파일을 확인해보니, 설치가 되어있습니다. 이러한 오류는 어떻게 해결해야하는지요?;;

아래는 에러 로그 입니다.


    104                 self.tagger = Tagger('--rcfile %s' % dicpath)
    105             except RuntimeError:
--> 106                 raise Exception('The MeCab dictionary does not exist at "%s". Is the dictionary correctly installed?\nYou can also try entering the dictionary path when initializing the Mecab class: "Mecab(\'/some/dic/path\')"' % dicpath)
    107         except NameError:
    108             raise Exception('Install MeCab in order to use it: https://github.com/koshort/pyeunjeon/')

Exception: The MeCab dictionary does not exist at "/Users/codeblock/.virtualenvs/notebooks/lib/python3.7/site-packages/eunjeon/data/mecabrc". Is the dictionary correctly installed?
You can also try entering the dictionary path when initializing the Mecab class: "Mecab('/some/dic/path')"```