Installing NLTK to Mountain Lion


Just leave some memo as I stacked to install NLTK into my Macbook Pro (Mountain Lion). Please note this is not a complete guidance, but just to mention points where I stacked.

1. Python must be re-installed even if Mac-python is available

In my Macbook Pro, Python 2.7 was pre-installed but I faced several problems when installing NLTK and related tools. Most of the problem was solved by installing "Standard" Python downloaded from python.org.

2. XQuartz need to be installed

At the beginning I forgot to install this, I got an error in ft2font.so when installing matplotlib. After installing XQuarts, the error gone. Maybe most of experienced guys already know but I missed this as I am a newbie. XQuartz installation can be done with GUI.

3. Numpy is missing?

(After installed XQuartz) I started to install matplotlib. However, "Could not find the header for numpy" in the log.

Kens-MacBook-Pro-2013:~ ken$ pip install matplotlib
Downloading/unpacking matplotlib
 Downloading matplotlib-1.2.1.tar.gz (38.4MB): 38.4MB downloaded
 Running setup.py egg_info for package matplotlib
 basedirlist is: ['/usr/local/', '/usr', '/usr/X11', '/opt/local']
 ============================================================================
 BUILDING MATPLOTLIB
 matplotlib: 1.2.1
 python: 2.7.2 (default, Oct 11 2012, 20:14:37) [GCC 4.2.1
 Compatible Apple Clang 4.0
 (tags/Apple/clang-418.0.60)]
 platform: darwin

 REQUIRED DEPENDENCIES
 numpy: 1.6.1
 * Could not find the headers for numpy. You may
 * need to install the development package.
 Complete output from command python setup.py egg_info:
 basedirlist is: ['/usr/local/', '/usr', '/usr/X11', '/opt/local']

============================================================================

BUILDING MATPLOTLIB

matplotlib: 1.2.1

python: 2.7.2 (default, Oct 11 2012, 20:14:37) [GCC 4.2.1

Compatible Apple Clang 4.0

(tags/Apple/clang-418.0.60)]

platform: darwin

 

REQUIRED DEPENDENCIES

numpy: 1.6.1

*1373093290* Could not find the headers for numpy. You may

*1373093291* need to install the development package.

*1365876297*[Uncategorized]Hello new blog world!!