最近在学数据分析师入门课,看了大纲,感觉终于不再慌乱踩坑了,开始存档最粗暴版学习笔记,遇到停止的地方按照下文红字直接输入就OK,方便和我一样的小伙伴参考呀,老师讲的很适合我这种初学者,PUSH了很多资料,我会不定期悄悄记录下来嘿嘿
Python下载及安装 Mac 版(老师主讲Windows,我用不着就没写……)
下载:
点击链接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 channelshttps://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-0https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
pip: 9.0.1-py35_1https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
python: 3.5.3-1https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
readline: 6.2-2https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
setuptools: 27.2.0-py35_0https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
sqlite: 3.13.0-0https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
tk: 8.5.18-0https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
wheel: 0.29.0-py35_0https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
xz: 5.2.2-1https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
zlib: 1.2.8-3https://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-0https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
numpy: 1.12.1-py35_0https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
scipy: 0.19.0-np112py35_0https://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_0https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
python-dateutil: 2.6.0-py35_0https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
pytz: 2017.2-py35_0https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
six: 1.10.0-py35_0https://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