pineapple icon indicating copy to clipboard operation
pineapple copied to clipboard

QUESTION: How to install NTLK?

Open cmlasa opened this issue 10 years ago • 4 comments

Hello - how do I install libraries that do not come built in to Pineapple? I'm using NLTK for an NLP class, but not quite sure how to go about this in Mac OS X.

cmlasa avatar Sep 21 '15 18:09 cmlasa

You need to distinguish between your (sometimes magical/interactive) editor and your python packages. If you have pip installed, you can just pip install nltk, and pip will do all of the heavy lifting for you (you should have pip installed in Mac OS X).

jisantuc avatar Sep 21 '15 19:09 jisantuc

Have you tried this?

import pineapple
%pip install nltk

deeplook avatar Sep 22 '15 14:09 deeplook

@jisantuc I had already installed nltk outside of Pineapple in the machine's standard Python environment, so that wouldn't work.

@deeplook Thanks, that worked. However, I'm now running into issues with NLTK data, as I don't think the Python environment within Pineapple is able to access the nltk_data folder outside Pineapple.

cmlasa avatar Sep 22 '15 18:09 cmlasa

@carlooos See https://github.com/nwhitehead/pineapple/issues/39.

deeplook avatar Sep 23 '15 09:09 deeplook