简体   繁体   中英

How can I install nltk corpora through Python Idle 3.8.6 on windows 10 64 bit?

I was trying to install nltk corpora through the python shell but it gives me this error message when I execute this command >>> import nltk :

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import nltk
ModuleNotFoundError: No module named 'nltk'

These were the instructions I followed:

Download NLTK corpora (plural of corpus) and other files.

a. Open the Python interpreter (eg, start Idle in interactive (shell) mode).

Then, from inside the interpreter execute the following Python statements.

b.>>> import nltk

c. >>> nltk.download()

Figured out why this was happening. I updated to the latest version of nltk and then the command worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM