프로그래밍 Programming
ImportError: cannot import name 'PunktWordTokenizer'
문장전달자
2017. 9. 25. 16:40
728x90
ImportError: cannot import name PunktWordTokenizer 에서는 해결 방법으로 NLTK 버전업그레이드를 제시하고 있다.
현재 NLTK 버전은 3.2.4 이다.
1 2 3 4 5 6 7 | (envalicia) root@localhost:~# python Python 3.5.2 |Anaconda custom (64-bit)| (default, Jul 2 2016, 17:53:06) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import nltk >>> nltk.__version__ '3.2.4' | cs |
아래와 같이 버전 업그레이드를 했지만 여전히 import error 를 발생시킨다.
1 2 3 4 5 6 7 8 9 10 11 12 | (envalicia) root@localhost:~# pip install -U nltk (envalicia) root@localhost:~# python Python 3.5.2 |Anaconda custom (64-bit)| (default, Jul 2 2016, 17:53:06) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import nltk >>> nltk.__version__ '3.2.5' >>> from nltk.tokenize import PunktWordTokenizer Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name 'PunktWordTokenizer' | cs |
혹시 해결책 아시는 분 댓글 부탁드립니다.
728x90