Install Python Data Analysis Related Libraties on Mac OSX

Includes NumPy, SciPy, matplotlib, pandas, IPython

Sheng-Chuan Yen
Big Data
Published in
2 min readAug 20, 2013

--

Motivation

Currently I apply pivot tables and charts of Excel to achieve data analysis tasks. However, I can only do some simple tasks, when there comes complex questions, it is difficult to finish jobs with Excel. In addition, I do need a way to analyse data more efficiently and quickly. In the end, I find out maybe it’s a good chance to learn several python libraries which used in scientific domains.

In order to using Python and related libraries on my daily data analysis tasks, I did some surveys and recorded the steps how I install all the tools needed on my laptop.

Instructions

Before all steps, my laptop is a macbook pro with OSX 10.8.

Step 1. install Xcode and Xcode command line tool

Please go to apple develper website to download and install Xcode. When Xcode is installed, go to Xcode’s preference and install Xcode command line tool in it.

Step 2. install homebrew

ruby -e “$(curl -fsSkL raw.github.com/mxcl/homebrew/go)

Step 3. install easy_install

wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O — | python

Step 4. install pip

easy_install pip

Step 5. install NumPy

sudo pip install numpy

Step 6. install SciPy

before installing scipy, we need gfortran first.

brew install fortran

Then using pip to install scipy

sudo pip install scipy

Step 7. install matplotlib

brew install freetypebrew install libpngbrew link freetypesudo pip install matplotlib

Step 8. install pandas

sudo pip install pandas

Step 9. install IPython

sudo pip install ipython

If a workman wishes to do a good job, he must first sharpen his tools.

~ an ancient chinese idiom

This is just a starting, and there are still a lot to learn. Hope I can get familiar and learn useful practices in my daily jobs.

Thank you for everyone reading this article and hope this post do really helps to you. If there is any problem, please kindly let me know, I will try my best to find the answer and discuss with you.

--

--

Sheng-Chuan Yen
Big Data
Editor for

Software Developer, Data Science Student, Family Photograper