Build a Python data analytics development environment on your Mac

Source: Internet
Author: User
Tags install matplotlib gfortran
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.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.