V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
yiqianbai
V2EX  ›  问与答

Python 数据分析入门之 mac 安装环境

  •  1
     
  •   yiqianbai · 2017-08-09 11:47:06 +08:00 · 2184 次点击
    这是一个创建于 2666 天前的主题,其中的信息可能已经有所发展或是发生改变。
    嗯,从今天开始要记录我从文科小白步入数据分析师的一步步,当然不是自学,第一步买课,等有自学能力开始再找能否自学的出路,经过对 DC 学院,Udacity、courses 等课程的框架、基础要求、老师,价格、平台服务等,最后选了 DC 学院: https://class.pkbigdata.com/#/classDetail/classIntroduce/1?slxydc=13sjfxsrm 目前为止还是很流畅,虽然 push 了很多资料,不过转化成自己的才是最好的,我把 mac 上安装 Python 及安装环境的全流程记录如下,每节课都讲的很详细,内容很丰富,我只码了冰山一角,可能比较粗暴,有需要的小伙伴可以参考(发现我发不了格式,暴风哭泣)

    python 下载及安装 Mac 版

    下载:
    点击链接 https://www.continuum.io/downloads#macos 选 442M 的进入下载页面:Anaconda

    下载之后安装就可以了(可以全部选默认设置)。

    环境配置:打开你的 Mac-Launchpad-其他-终端
    Last login: Fri Jun  9 10:17:14 on ttys000
    tangningdeMacBook:~ tangning$ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
    tangningdeMacBook:~ tangning$ conda config --set show_channel_urls yes
    tangningdeMacBook:~ tangning$ conda create -n course_py35 python=3.5
    Fetching package metadata ...........
    Solving package specifications: .

    Package plan for installation in environment /Applications/Utilities/anaconda/envs/course_py35:

    The following NEW packages will be INSTALLED:

        openssl:    1.0.2l-0      https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        pip:        9.0.1-py35_1  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        python:     3.5.3-1       https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        readline:   6.2-2         https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        setuptools: 27.2.0-py35_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        sqlite:     3.13.0-0      https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        tk:         8.5.18-0      https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        wheel:      0.29.0-py35_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        xz:         5.2.2-1       https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        zlib:       1.2.8-3       https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free

    Proceed ([y]/n)? y

    openssl-1.0.2l 100% |################################| Time: 0:00:03   1.03 MB/s
    readline-6.2-2 100% |################################| Time: 0:00:00   1.34 MB/s
    sqlite-3.13.0- 100% |################################| Time: 0:00:01   1.22 MB/s
    tk-8.5.18-0.ta 100% |################################| Time: 0:00:01   1.62 MB/s
    xz-5.2.2-1.tar 100% |################################| Time: 0:00:00   2.17 MB/s
    zlib-1.2.8-3.t 100% |################################| Time: 0:00:00   6.63 MB/s
    python-3.5.3-1 100% |################################| Time: 0:00:05   2.03 MB/s
    setuptools-27. 100% |################################| Time: 0:00:00   3.40 MB/s
    wheel-0.29.0-p 100% |################################| Time: 0:00:00   4.33 MB/s
    pip-9.0.1-py35 100% |################################| Time: 0:00:00   3.65 MB/s
    #
    # To activate this environment, use:
    # > source activate course_py35
    #
    # To deactivate this environment, use:
    # > source deactivate course_py35
    #
    tangningdeMacBook:~ tangning$ source activate course_py35
    (course_py35) tangningdeMacBook:~ tangning$ python
    Python 3.5.3 |Continuum Analytics, Inc.| (default, Mar  6 2017, 12:15:08) 
    [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> quit()
    (course_py35) tangningdeMacBook:~ tangning$ conda install scipy
    Fetching package metadata ...........
    Solving package specifications: .

    Package plan for installation in environment /Applications/Utilities/anaconda/envs/course_py35:

    The following NEW packages will be INSTALLED:

        mkl:   2017.0.1-0         https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        numpy: 1.12.1-py35_0      https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        scipy: 0.19.0-np112py35_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free

    Proceed ([y]/n)? y

    mkl-2017.0.1-0 100% |########################################| Time: 0:02:24 804.80 kB/s
    numpy-1.12.1-p 100% |########################################| Time: 0:00:02   1.55 MB/s
    scipy-0.19.0-n 100% |########################################| Time: 0:00:08   1.97 MB/s
    (course_py35) tangningdeMacBook:~ tangning$ python
    Python 3.5.3 |Continuum Analytics, Inc.| (default, Mar  6 2017, 12:15:08) 
    [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import numpy
    >>> quit()
    (course_py35) tangningdeMacBook:~ tangning$ conda install pandas
    Fetching package metadata ...........
    Solving package specifications: .

    Package plan for installation in environment /Applications/Utilities/anaconda/envs/course_py35:

    The following NEW packages will be INSTALLED:

        pandas:          0.20.1-np112py35_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        python-dateutil: 2.6.0-py35_0       https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        pytz:            2017.2-py35_0      https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        six:             1.10.0-py35_0      https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free

    Proceed ([y]/n)? y

    pytz-2017.2-py 100% |########################################| Time: 0:00:00 884.66 kB/s
    six-1.10.0-py3 100% |########################################| Time: 0:00:00   8.72 MB/s
    python-dateuti 100% |########################################| Time: 0:00:00   1.59 MB/s
    pandas-0.20.1- 100% |########################################| Time: 0:00:03   2.73 MB/s
    (course_py35) tangningdeMacBook:~ tangning$ pip install scikit-learn
    Collecting scikit-learn
      Downloading scikit_learn-0.18.1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (7.2MB)
        100% |████████████████████████████████| 7.2MB 17kB/s 
    Installing collected packages: scikit-learn
    Successfully installed scikit-learn-0.18.1
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3646 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 04:27 · PVG 12:27 · LAX 20:27 · JFK 23:27
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.