MacOSX 10.8.5(Mountain Lion) Build an environment where you can perform numerical calculations with Python.
This time I will try using Homebrew and pip. Homebrew is version 0.9.5.
First, install various things with the following commands.
$ brew install python
$ sudo easy_install pip
$ sudo pip install ipython
$ sudo pip install scipy
$ sudo pip install ipython
In this environment, python 2.7.6 and pip 1.5.4 are installed.
Since the Fortran compiler is required to install Scipy, install gfortran.
$ brew install gfortran
$ sudo pip install scipy
It took a long time to install Scipy.
From here, it is preparation for installing matplotlib.
$ brew install freetype
Without this, the installation of matplotlib will moss. It was also necessary to create the following symbolic links. (I referred to here)
$ ln -s /usr/local/opt/freetype/include/freetype2 /usr/local/include/freetype
And install matplotlib
sudo pip install matplotlib
I don't know if I will use it, but I will also install pandas
$ sudo pip install pandas
Below is the result of checking each version with pip freeze
.
ipython==1.2.1
matplotlib==1.3.1
numpy==1.6.1
pandas==0.13.1
scipy==0.13.3
Recommended Posts