Build a python data analysis and development environment on MAC and python Data Analysis

Source: Internet
Author: User
Tags install brew install pandas install matplotlib gfortran

Build a python data analysis and development environment on MAC and python Data Analysis

Recently, I have been working in the data development field and want to build a local data development environment. I have three years of python development experience and want to build a data development environment using numpy, scipy, sklearn, and pandas.

There are many articles in the ubuntu environment in Baidu, which are very smooth. There is little information about the MAC environment. Baidu has made it wrong. Let me add one.

I will not talk about installing python on MAC.

Install pip

I like to use pip to install the python library, which is very convenient. pip installation can only use the source code.

# Download source code https://pypi.python.org/pypi/pip when I download is 8.0.2 # unzip tar xvzf pip8.0.2.tar.gz # install cd pip-1.4.1python setup. py install

Install numpy

Numpy is the foundation of other libraries such as scipy. It has no dependencies and is relatively simple to install.

pip install numpy

Install brew

After numpy is installed, scipy is installed. Why is it inserted? It depends on the fortran library. The installation of the fortran Library requires the MAC package management tool homebrew.

# Download brewcurl-LsSf http://github.com/mxcl/homebrew/tarball/master sudo tar xvz-C/usr/local -- strip 1

Install scipy

Scipy is the foundation of sklearn, but it depends on the gfortran library. gfortran has been integrated into the gcc library. It is good to install gcc. It is very easy to install any packages with brew.

# Install the gcc library brew install gcc # install scipypip install scipy, and click install # install matplotlib to display the data drawing. pip install matplotlib # install sklearn, I understand that this installation must be performed before pandas pip install-U numpy scipy scikit-learn # install pandaspip install pandas

The environment has been set up here. It is very simple to start up. Note: Pay attention to permissions during installation. If you need permissions, add sudo in front.

Articles you may be interested in:
  • Steps for upgrading to Python3.3 for Mac OS X10.9 Installation
  • Tutorial on installing Python Pillow library on Mac OS
  • Build a Python Development Environment on Mac OS
  • Use mod_wsgi on Mac OS to connect Python to Apache server

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.