ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew install python
curl https://bootstrap.pypa.io/ez_setup.py -o - | python
If you don't have curl installed, brew install curl to install the curl package.
sudo easy_install pip
sudo pip install -U numpy pyyaml nltk pyenchant
python
>>> import nltk
Ubuntu follows many of the same steps but using apt-get as the package repo. Here are the commands to run:
sudo apt-get install easy_install
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python
sudo easy_install pip
sudo apt-get install python-dev
sudo pip install -U numpy
sudo pip install -U pyyaml nltk
sudo apt-get install python-matplotlib
Lastly, test the install with:
python
>>> import nltk