(Addition 2013/10/21) -Added the installation of SciPy
It seems that a FORTRAN compiler is required for scipy installation.
% brew install gfortran
Next, install various things with pip.
% pip install ipython
% pip install readline
% pip install numpy
% CC=clang CXX=clang FFLAGS=-ff2c pip install scipy
% pip install matplotlib
ipython
IPython is a shell for running Python interactively. Compared to the original Python, it has enhanced type inference, added grammar for interactive execution, and can be complemented with code highlighting and tabs. IPython is published as part of the SciPy package. Source: Wikipedia (IPython)
readline Library for character string input. Make ipython easier to use.
numpy
An extension module for Python that adds support for typed multidimensional arrays (which can represent vectors, matrices, etc.) to Python for efficient numerical calculations, and is large-scale for manipulating them. Provides a high-level library of mathematical functions. Source: Wikipedia (NumPy)
scipy
A library that enables high-dimensional scientific and technological calculations in addition to NumPy array and matrix operations. Source: Perfect Python Gijutsu-Hyoronsha Co., Ltd. P. 291
matplotlib
A graph drawing library for Python and its scientific computing library NumPy. Source: Wikipedia (matplotlib)
If you are using virtualenv, ipython3 will be installed in .virtualenvs / virtual environment name / bin /
, so make a symbolic link.
% cd ~/.virtualenvs/Virtual environment name/bin
% ln -s ipython3 ./ipython
Now you can start ipython from the terminal with ʻipython`.
#Launch ipython
% ipython --pylab
In [1]: x = arange(0,1,0.1)
In [2]: y = 2*x
In [3]: plot(x,y)
Out[3]: [<matplotlib.lines.Line2D at 0x10cbbec10>]
-[Sessan's Diary-Install matplotlib in OS X Mountain Lion Environment](http://sessan.hatenablog.com/entry/2013/05/11/142547 "sessan's Diary-Install matplotlib in OS X Mountain Lion Environment" install") ・ @IT --Data Scientist Training Course for IT Engineers (3) ・ Akiyoko blog ・ F13 --Neural network with PyBrain --Installation
Recommended Posts