Recently, work has been transformed into a data development area to build a data development environment locally. I have three years of Python development experience, immediately think of using NumPy, scipy, Sklearn, pandas set up a data development environment.
Ubuntu environment, Baidu in more articles, build up very smoothly. MAC Environment of less information, Baidu out of, has been wrong, then I would like to add an article.
Mac comes with Python,python installation I don't have to say much.
Install PIP
I like to use Pip to install the Python library, very convenient, PIP installation can only use the source code.
# download Source code HTTPS://PYPI.PYTHON.ORG/PYPI/PIP I'm going to download it at 8.0.2 version # Unzip the tar xvzf pip8.0.2.tar.gz# installation CD Pip-1.4.1python setup.py Install
Installing NumPy
NumPy is the foundation, is the scipy and other libraries and other bases, no reliance, relatively simple installation.
Pip Install NumPy
Installing Brew
NumPy installation, is the installation of scipy, why inserted a pole it? It relies on the Fortran library, the installation of the Fortran library needs to use the Mac's package management tool homebrew
# download BREWCURL-LSSF http://github.com/mxcl/homebrew/tarball/master sudo tar xvz-c/usr/local--strip 1
Installing scipy
SciPy is the foundation of Sklearn, but it relies on the Gfortran library, Gfortran has been integrated into the GCC library, the installation of GCC is good, with the brew installed what package has become very simple.
#安装gcc库brew Install gcc# installation SCIPYPIP installed SCIPY rear installation, the orderly # Install Matplotlib, easy to display data drawings pip install matplotlib# Install Sklearn, I understand this installation must be pandas before Pip install-u numpy scipy scikit-learn# install Pandaspip installed pandas
Here the environment is set up, open it, in fact, it is very simple to build up. Note that when installing, pay attention to permissions and add sudo to the front if you need permission.