君子生非异也,善假于物也
-- 荀子
从 Anaconda
官文网站 https://www.anaconda.com/download 下载操作系统对就的安装文件,选择 Python 3.7 版本。
Anaconda
默认安装了许多有用的数据科学工具和 Python
库。可以直接测试 sklearn
。
Windows
下载地址: https://www.anaconda.com/download/#windows
下载后缀为 exe
格式的文件,下载完成后双击开始安装,一直按 Next 即可。
从开始菜单启动 Anaconda Navigator
新建 Python 3
Notebook
查看 sklearn 版本
sklearn_version.PNGimport sklearn
sklearn.show_versions()
Could not locate executable g77
Could not locate executable f77
Could not locate executable ifort
Could not locate executable ifl
Could not locate executable f90
Could not locate executable DF
Could not locate executable efl
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable g95
Could not locate executable efort
Could not locate executable efc
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
System:
python: 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)]
executable: D:\Anaconda3\python.exe
machine: Windows-10-10.0.17134-SP0
BLAS:
macros:
lib_dirs:
cblas_libs: cblas
Python deps:
pip: 18.1
setuptools: 40.6.3
sklearn: 0.20.1
numpy: 1.15.4
scipy: 1.1.0
Cython: 0.29.2
pandas: 0.23.4
macOS
下载地址: https://www.anaconda.com/download/#macos
下载后缀为 pkg
格式的文件,下载完成后双击开始安装。
- Anaconda 安装器提示
- 介绍 Anaconda 安装器
- 请先阅读安装 Anaconda 相关信息
- 查看许可协议
- 同意条款
- 安装位置
- 正式安装 Anaconda
- 暂时不安装 VSCode,如何需要,稍后可以通过 Anaconda-Navigator 安装
- 安装成功
-
DashBoard
里面搜索Anaconda-Navigator
- 显示主界面,这里可以安装
VSCode
等应用程序
- 查看
sklearn
版本
import sklearn
sklearn.show_versions()
System:
python: 3.7.1 (default, Dec 14 2018, 13:28:58) [Clang 4.0.1 (tags/RELEASE_401/final)]
executable: /Users/iosdevlog/anaconda3/bin/python
machine: Darwin-18.2.0-x86_64-i386-64bit
BLAS:
macros: SCIPY_MKL_H=None, HAVE_CBLAS=None
lib_dirs: /Users/iosdevlog/anaconda3/lib
cblas_libs: mkl_rt, pthread
Python deps:
pip: 18.1
setuptools: 40.6.3
sklearn: 0.20.1
numpy: 1.15.4
scipy: 1.1.0
Cython: 0.29.2
pandas: 0.23.4
Linux
下载地址:https://www.anaconda.com/download/#linux
下载后缀为 sh
格式的文件,下载完成后打开终端进入下载目标,输入以下命令开始安装。
$ wget -c https://repo.continuum.io/archive/Anaconda3-2018.12-Linux-x86_64.sh
$ chmod +x Anaconda3-2018.12-Linux-x86_64.sh
$ ./Anaconda3-2018.12-Linux-x86_64.sh
- 运行安装程序
- 空格翻页查看 License
- 输入 yes 接受 License
- 安装位置,这里使用默认
- 配置 Anaconda 环境到
~/.bashrc
- 先不安装 VSCode
- 重新加载
~/.bashrc
,运行 anaconda-navigator
- 显示主界面,这里可以安装
VSCode
等应用程序
- 查看
sklearn
版本
$ python
Python 3.7.1 (default, Dec 14 2018, 19:28:38)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sklearn
>>> sklearn.show_versions()
System:
python: 3.7.1 (default, Dec 14 2018, 19:28:38) [GCC 7.3.0]
executable: /home/iosdevlog/anaconda3/bin/python
machine: Linux-4.13.0-45-generic-x86_64-with-debian-buster-sid
BLAS:
macros: SCIPY_MKL_H=None, HAVE_CBLAS=None
lib_dirs: /home/iosdevlog/anaconda3/lib
cblas_libs: mkl_rt, pthread
Python deps:
pip: 18.1
setuptools: 40.6.3
sklearn: 0.20.1
numpy: 1.15.4
scipy: 1.1.0
Cython: 0.29.2
pandas: 0.23.4
>>>
网友评论