1
파이썬 셸에서 ntlk와 pos_tag를 가져올 수 있습니다. 내가Nltk 가져 오기 문제
import nltk
from nltk import pos_tag
같은 스크립트를 작성해야 할 때
>>> import nltk
>>> from nltk import pos_tag
는하지만
Traceback (most recent call last):
File "mynltkfile.py", line 1, in <module>
from nltk import pos_tag
File "/Users/jacksongeller/Desktop/nltktest/mynltkfile.py", line 1, in <module>
from nltk import pos_tag
ImportError: cannot import name pos_tag
이 나는 이미 nltk.download했던 역 추적 오류를() 얻을 모든 것을 다운로드 한. 난 그냥 스크립트에서 NLTK를 가져 오는 경우 는 또한, 내가 같은 역 추적
Traceback (most recent call last):
File "mynltkfile.py", line 1, in <module>
import nltk
File "/Users/jacksongeller/Desktop/nltktest/mynltkfile.py", line 1, in <module>
from nltk import pos_tag
ImportError: cannot import name pos_tag
내가 파일 실종 얻을 또한 NumPy와
파이프습니까? 그렇다면 어디로 가야합니까? 사전
인터프리터에서
인터프리터 >>> 인쇄 (NLTK) >>> 인쇄 (sys.executable) < '/Library/Python/2.7/site-packages/nltk/INIT __ __. PYC'에서 모듈의 NLTK '> /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python – user2758113
그리고 스크립트에서 실행할 때 출력은 어떻게됩니까? "/Users/jacksongeller/Desktop/nltk.py" 수입 NLTK 파일, 라인 1, 파일 "test.py", 줄 1 : –
unutbu
스크립트가 는' 역 추적 (가장 최근 통화 마지막) code' in ImportError : 이름을 가져올 수 없습니다. –
user2758113