官文指南: http://scikit-learn.org/stable/developers/advanced_installation.html
$ wget -c https://github.com/scikit-learn/scikit-learn/archive/0.20.X.zip # 下載 scikit-learn 0.20.x 源碼
$ wget -c https://files.pythonhosted.org/packages/0f/d7/136a447295adade38e7184618816e94190ded028318062a092daeb972073/scikit-learn-0.20.0.tar.gz # https://pypi.org/project/scikit-learn/#files
$ tar xzvf scikit-learn-0.20.0.tar.gz # 如果從 pypi.org 下載就用這條命令解壓
$ unzip 0.20.X.zip # 解壓到當(dāng)前目錄
$ cd scikit-learn-0.20.X/
$ python3 -m venv sklearn0.20.x # 創(chuàng)建 sklearn 的虛擬環(huán)境
$ source sklearn0.20.x/bin/activate # 激活虛擬環(huán)境
(sklearn0.20.x) $ pip install numpy scipy cython pytest matplotlib # 安裝依賴
(sklearn0.20.x) $ pip install --editable . # 安裝 sklearn
(sklearn0.20.x) $ pytest sklearn