|
| 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 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | +从开始菜单启动 `Anaconda Navigator` |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | +新建 `Python 3` Notebook |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | +查看 sklearn 版本 |
| 51 | + |
| 52 | + |
| 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 | + |
| 101 | + |
| 102 | +2. 介绍 Anaconda 安装器 |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | +3. 请先阅读安装 Anaconda 相关信息 |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | +4. 查看许可协议 |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | +5. 同意条款 |
| 115 | + |
| 116 | + |
| 117 | + |
| 118 | +6. 安装位置 |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | +7. 正式安装 Anaconda |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | +8. 暂时不安装 VSCode,如何需要,稍后可以通过 Anaconda-Navigator 安装 |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | +9. 安装成功 |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | +10. `DashBoard` 里面搜索 `Anaconda-Navigator` |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | +11. 显示主界面,这里可以安装 `VSCode` 等应用程序 |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | +12. 查看 `sklearn` 版本 |
| 143 | + |
| 144 | + |
| 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 | + |
| 186 | + |
| 187 | +2. 空格翻页查看 License |
| 188 | + |
| 189 | + |
| 190 | + |
| 191 | +3. 输入 *yes* 接受 License |
| 192 | + |
| 193 | + |
| 194 | + |
| 195 | +4. 安装位置,这里使用默认 |
| 196 | + |
| 197 | + |
| 198 | + |
| 199 | +5. 配置 Anaconda 环境到 `~/.bashrc` |
| 200 | + |
| 201 | + |
| 202 | + |
| 203 | +6. 先不安装 VSCode |
| 204 | + |
| 205 | + |
| 206 | + |
| 207 | +7. 重新加载 `~/.bashrc`,运行 anaconda-navigator |
| 208 | + |
| 209 | + |
| 210 | + |
| 211 | +8. 显示主界面,这里可以安装 `VSCode` 等应用程序 |
| 212 | + |
| 213 | + |
| 214 | + |
| 215 | +9. 查看 `sklearn` 版本 |
| 216 | + |
| 217 | + |
| 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