Mel
Mel

Reputation: 21

unable to import ’NLTK'

I’m currently working on my first chatbot and I need nltk for this bot to install. So I opened my terminal on my Mac and type pip install nltk and it successfully installs.

So I opened VisualStudioCode and I type import nltk but it replies: "Unable to import 'nltk‘ "

Why is this?

Thanks a lot

Upvotes: 0

Views: 6385

Answers (3)

Mel
Mel

Reputation: 21

It was bc I got the wrong version of python in vscose

Upvotes: 1

Lucy Li Chenhui
Lucy Li Chenhui

Reputation: 9

try pip3 install nltk if you are using python3

Upvotes: 0

Robert Fent
Robert Fent

Reputation: 203

Did you select a python interpreter? If this is not working you could try to install it from the command line in vscode

Upvotes: 0

Related Questions