pineapple
pineapple copied to clipboard
QUESTION: How to install NTLK?
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.
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).
Have you tried this?
import pineapple
%pip install nltk
@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.
@carlooos See https://github.com/nwhitehead/pineapple/issues/39.