Liv
Liv

Reputation: 21

AttributeError: module 'nltk' has no attribute 'download'

I am using a mac and have not been able to access any of the nltk files I have downloaded. All of the files are on my computer downloaded using terminal. No matter what I try to access or how I write it, I always get an attribute error saying nltk has no attribute download. This is an example of some of the code I have put in

Upvotes: 2

Views: 7471

Answers (3)

Mahfuz
Mahfuz

Reputation: 21

It's simple, load corpora: It worked for me. Open python interpreter by opening terminal or anaconda command prompt and type 'python' without quotation; ex: C:\Users\UserName>python. Then type: >>> import nltk and >>> nltk.download() Choose and install all or some corpora. If you don't know what exactly causing the error, you can download all packages. You can also check here.

Upvotes: 0

Farnaz
Farnaz

Reputation: 94

Following these steps worked for me. Run in command line:

> pip uninstall nltk
> pip install -U nltk

Upvotes: 0

Peter Dolan
Peter Dolan

Reputation: 1423

Try running sudo /Applications/Python\ 3.6/Install\ Certificates.command in terminal

Credit to Alvations

Upvotes: 2

Related Questions