君子生非异也,善假于物也 -- 荀子
从 Anaconda
官文网站 https://www.anaconda.com/download 下载操作系统对就的安装文件,选择 Python 3.7 版本。
Anaconda
默认安装了许多有用的数据科学工具和 Python
库。可以直接测试 sklearn
。
下载地址: https://www.anaconda.com/download/#windows
下载后缀为 exe
格式的文件,下载完成后双击开始安装,一直按 Next 即可。
1.PNG
2.PNG
3.PNG
4.PNG
5.PNG
6.PNG
7.PNG
8.PNG
9.PNG
从开始菜单启动 Anaconda Navigator
10.PNG
新建 Python 3
Notebook
11.PNG
查看 sklearn 版本
sklearn_version.PNG
import 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
下载地址: https://www.anaconda.com/download/#macos
下载后缀为 pkg
格式的文件,下载完成后双击开始安装。
1.png
2.png
3.png
4.png
5.png
6.png
7.png
8.png
9.png
DashBoard
里面搜索 Anaconda-Navigator
10.png
VSCode
等应用程序11.png
sklearn
版本sklearn.png
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
下载地址: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
1.png
2.png
3.png
4.png
~/.bashrc
5.png
6.png
~/.bashrc
,运行 anaconda-navigator7.png
VSCode
等应用程序8.png
sklearn
版本9.png
$ 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
>>>