Skip to content

Commit 0b69278

Browse files
authored
Create 2019-01-02-anaconda.md
1 parent 54d0774 commit 0b69278

File tree

1 file changed

+246
-0
lines changed

1 file changed

+246
-0
lines changed

_posts/2019-01-02-anaconda.md

Lines changed: 246 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
---
2+
layout: post
3+
title: 2019年最新最全的 Anaconda 安装指南
4+
author: iosdevlog
5+
date: 2019-01-02 10:46:55 +0800
6+
description: ""
7+
category: 机器学习
8+
tags: []
9+
---
10+
11+
> 君子生非异也,善假于物也
12+
> -- 荀子
13+
14+
`Anaconda` 官文网站 <https://www.anaconda.com/download> 下载操作系统对就的安装文件,选择 Python 3.7 版本。
15+
16+
`Anaconda` 默认安装了许多有用的数据科学工具和 `Python` 库。可以直接测试 `sklearn`
17+
18+
# Windows
19+
20+
下载地址: <https://www.anaconda.com/download/#windows>
21+
22+
下载后缀为 `exe` 格式的文件,下载完成后双击开始安装,一直按 *Next* 即可。
23+
24+
![1.PNG](https://upload-images.jianshu.io/upload_images/910914-5341a1aff83e4654.PNG?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
25+
26+
![2.PNG](https://upload-images.jianshu.io/upload_images/910914-3aacb364ae69709d.PNG?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
27+
28+
![3.PNG](https://upload-images.jianshu.io/upload_images/910914-7bc638710cf94e59.PNG?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
29+
30+
![4.PNG](https://upload-images.jianshu.io/upload_images/910914-4cbfd3f89b6d5c29.PNG?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
31+
32+
![5.PNG](https://upload-images.jianshu.io/upload_images/910914-6d21f44aa8b85980.PNG?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
33+
34+
![6.PNG](https://upload-images.jianshu.io/upload_images/910914-9b7ce0c6b20f48db.PNG?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
35+
36+
![7.PNG](https://upload-images.jianshu.io/upload_images/910914-fd75bb4747f78225.PNG?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
37+
38+
![8.PNG](https://upload-images.jianshu.io/upload_images/910914-b598ad810bc67b34.PNG?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
39+
40+
![9.PNG](https://upload-images.jianshu.io/upload_images/910914-509cc16d06a168cf.PNG?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
41+
42+
从开始菜单启动 `Anaconda Navigator`
43+
44+
![10.PNG](https://upload-images.jianshu.io/upload_images/910914-9f08d526667845bd.PNG?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
45+
46+
新建 `Python 3` Notebook
47+
48+
![11.PNG](https://upload-images.jianshu.io/upload_images/910914-656b65bd943e91c7.PNG?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
49+
50+
查看 sklearn 版本
51+
52+
![sklearn_version.PNG](https://upload-images.jianshu.io/upload_images/910914-c87b2db158a01f0c.PNG?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
53+
54+
```
55+
import sklearn
56+
sklearn.show_versions()
57+
Could not locate executable g77
58+
Could not locate executable f77
59+
Could not locate executable ifort
60+
Could not locate executable ifl
61+
Could not locate executable f90
62+
Could not locate executable DF
63+
Could not locate executable efl
64+
Could not locate executable gfortran
65+
Could not locate executable f95
66+
Could not locate executable g95
67+
Could not locate executable efort
68+
Could not locate executable efc
69+
Could not locate executable flang
70+
don't know how to compile Fortran code on platform 'nt'
71+
72+
System:
73+
python: 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)]
74+
executable: D:\Anaconda3\python.exe
75+
machine: Windows-10-10.0.17134-SP0
76+
77+
BLAS:
78+
macros:
79+
lib_dirs:
80+
cblas_libs: cblas
81+
82+
Python deps:
83+
pip: 18.1
84+
setuptools: 40.6.3
85+
sklearn: 0.20.1
86+
numpy: 1.15.4
87+
scipy: 1.1.0
88+
Cython: 0.29.2
89+
pandas: 0.23.4
90+
```
91+
92+
# macOS
93+
94+
下载地址: <https://www.anaconda.com/download/#macos>
95+
96+
下载后缀为 `pkg` 格式的文件,下载完成后双击开始安装。
97+
98+
1. Anaconda 安装器提示
99+
100+
![1.png](https://upload-images.jianshu.io/upload_images/910914-2eae6f16d7d0194d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
101+
102+
2. 介绍 Anaconda 安装器
103+
104+
![2.png](https://upload-images.jianshu.io/upload_images/910914-02a28c24ccc44d0d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
105+
106+
3. 请先阅读安装 Anaconda 相关信息
107+
108+
![3.png](https://upload-images.jianshu.io/upload_images/910914-3a737e556151bf56.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
109+
110+
4. 查看许可协议
111+
112+
![4.png](https://upload-images.jianshu.io/upload_images/910914-94d0d321a8c28e21.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
113+
114+
5. 同意条款
115+
116+
![5.png](https://upload-images.jianshu.io/upload_images/910914-b4bbb4e23fb39419.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
117+
118+
6. 安装位置
119+
120+
![6.png](https://upload-images.jianshu.io/upload_images/910914-c6a7a0ff24551229.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
121+
122+
7. 正式安装 Anaconda
123+
124+
![7.png](https://upload-images.jianshu.io/upload_images/910914-2a83856c071a18d2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
125+
126+
8. 暂时不安装 VSCode,如何需要,稍后可以通过 Anaconda-Navigator 安装
127+
128+
![8.png](https://upload-images.jianshu.io/upload_images/910914-72d4f24f0708ba0c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
129+
130+
9. 安装成功
131+
132+
![9.png](https://upload-images.jianshu.io/upload_images/910914-e59444df87bb34ae.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
133+
134+
10. `DashBoard` 里面搜索 `Anaconda-Navigator`
135+
136+
![10.png](https://upload-images.jianshu.io/upload_images/910914-04429ea378b86371.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
137+
138+
11. 显示主界面,这里可以安装 `VSCode` 等应用程序
139+
140+
![11.png](https://upload-images.jianshu.io/upload_images/910914-a7fe989d536fb458.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
141+
142+
12. 查看 `sklearn` 版本
143+
144+
![sklearn.png](https://upload-images.jianshu.io/upload_images/910914-94a94ab8b3ebaabe.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
145+
146+
```
147+
import sklearn
148+
149+
sklearn.show_versions()
150+
151+
System:
152+
python: 3.7.1 (default, Dec 14 2018, 13:28:58) [Clang 4.0.1 (tags/RELEASE_401/final)]
153+
executable: /Users/iosdevlog/anaconda3/bin/python
154+
machine: Darwin-18.2.0-x86_64-i386-64bit
155+
156+
BLAS:
157+
macros: SCIPY_MKL_H=None, HAVE_CBLAS=None
158+
lib_dirs: /Users/iosdevlog/anaconda3/lib
159+
cblas_libs: mkl_rt, pthread
160+
161+
Python deps:
162+
pip: 18.1
163+
setuptools: 40.6.3
164+
sklearn: 0.20.1
165+
numpy: 1.15.4
166+
scipy: 1.1.0
167+
Cython: 0.29.2
168+
pandas: 0.23.4
169+
```
170+
171+
# Linux
172+
173+
下载地址:<https://www.anaconda.com/download/#linux>
174+
175+
下载后缀为 `sh` 格式的文件,下载完成后打开终端进入下载目标,输入以下命令开始安装。
176+
177+
```
178+
$ wget -c https://repo.continuum.io/archive/Anaconda3-2018.12-Linux-x86_64.sh
179+
$ chmod +x Anaconda3-2018.12-Linux-x86_64.sh
180+
$ ./Anaconda3-2018.12-Linux-x86_64.sh
181+
```
182+
183+
1. 运行安装程序
184+
185+
![1.png](https://upload-images.jianshu.io/upload_images/910914-56da773397de8c56.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
186+
187+
2. 空格翻页查看 License
188+
189+
![2.png](https://upload-images.jianshu.io/upload_images/910914-d44e5cd33762dccd.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
190+
191+
3. 输入 *yes* 接受 License
192+
193+
![3.png](https://upload-images.jianshu.io/upload_images/910914-e85b113d8c784d7e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
194+
195+
4. 安装位置,这里使用默认
196+
197+
![4.png](https://upload-images.jianshu.io/upload_images/910914-745455393cae02af.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
198+
199+
5. 配置 Anaconda 环境到 `~/.bashrc`
200+
201+
![5.png](https://upload-images.jianshu.io/upload_images/910914-d9c970b55acc1c81.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
202+
203+
6. 先不安装 VSCode
204+
205+
![6.png](https://upload-images.jianshu.io/upload_images/910914-c3dbb7454e596ff7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
206+
207+
7. 重新加载 `~/.bashrc`,运行 anaconda-navigator
208+
209+
![7.png](https://upload-images.jianshu.io/upload_images/910914-c51cd13cf63f167e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
210+
211+
8. 显示主界面,这里可以安装 `VSCode` 等应用程序
212+
213+
![8.png](https://upload-images.jianshu.io/upload_images/910914-70844cca6221a92f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
214+
215+
9. 查看 `sklearn` 版本
216+
217+
![9.png](https://upload-images.jianshu.io/upload_images/910914-248ff8df33d32d44.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
218+
219+
```
220+
$ python
221+
Python 3.7.1 (default, Dec 14 2018, 19:28:38)
222+
[GCC 7.3.0] :: Anaconda, Inc. on linux
223+
Type "help", "copyright", "credits" or "license" for more information.
224+
>>> import sklearn
225+
>>> sklearn.show_versions()
226+
227+
System:
228+
python: 3.7.1 (default, Dec 14 2018, 19:28:38) [GCC 7.3.0]
229+
executable: /home/iosdevlog/anaconda3/bin/python
230+
machine: Linux-4.13.0-45-generic-x86_64-with-debian-buster-sid
231+
232+
BLAS:
233+
macros: SCIPY_MKL_H=None, HAVE_CBLAS=None
234+
lib_dirs: /home/iosdevlog/anaconda3/lib
235+
cblas_libs: mkl_rt, pthread
236+
237+
Python deps:
238+
pip: 18.1
239+
setuptools: 40.6.3
240+
sklearn: 0.20.1
241+
numpy: 1.15.4
242+
scipy: 1.1.0
243+
Cython: 0.29.2
244+
pandas: 0.23.4
245+
>>>
246+
```

0 commit comments

Comments
 (0)