- 工信部備案號 滇ICP備05000110號-1
- 滇公安備案 滇53010302000111
- 增值電信業(yè)務(wù)經(jīng)營許可證 B1.B2-20181647、滇B1.B2-20190004
- 云南互聯(lián)網(wǎng)協(xié)會理事單位
- 安全聯(lián)盟認證網(wǎng)站身份V標記
- 域名注冊服務(wù)機構(gòu)許可:滇D3-20230001
- 代理域名注冊服務(wù)機構(gòu):新網(wǎng)數(shù)碼
1. 在centos7上安裝sklearn各種報錯
gcc: error: unrecognized command line option ‘-Qunused-arguments’gcc: error: unrecognized command line option ‘-Qunused-arguments’gcc: error: unrecognized command line option ‘-Qunused-arguments’
google下應該是pip版本問題,之前安裝的pip版本是7.1,現(xiàn)在最新版本都到8.1了
2. 在pipy下載pip whl安裝文件
http://www.tjdsmy.cn/pypi/pip下載whl安裝文件
下載:
[root@slaver3 ~]# wget http://www.tjdsmy.cn/packages/9c/32/004ce0852e0a127f07f358b715015763273799bd798956fa930814b60f39/pip-8.1.2-py2.py3-none-any.whl#md5=0570520434c5b600d89ec95393b2650b--2016-09-05 16:19:48-- http://www.tjdsmy.cn/packages/9c/32/004ce0852e0a127f07f358b715015763273799bd798956fa930814b60f39/pip-8.1.2-py2.py3-none-any.whlResolving pypi.python.org (pypi.python.org)... 151.101.24.223, 2a04:4e42:6::223Connecting to pypi.python.org (pypi.python.org)|151.101.24.223|:443... connected. HTTP request sent, awaiting response... 200 OKLength: 1198961 (1.1M) [application/octet-stream] Saving to: ‘pip-8.1.2-py2.py3-none-any.whl’100%[=====================================================>] 1,198,961 667KB/s in 1.8s2016-09-05 16:19:50 (667 KB/s) - ‘pip-8.1.2-py2.py3-none-any.whl’ saved [1198961/1198961]
安裝
[root@slaver3 ~]# pip install pip-8.1.2-py2.py3-none-any.whlYou are using pip version 7.1.0, however version 8.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command.Processing ./pip-8.1.2-py2.py3-none-any.whl Installing collected packages: pip Found existing installation: pip 7.1.0 Uninstalling pip-7.1.0: Successfully uninstalled pip-7.1.0Successfully installed pip-8.1.2
3. pip安裝sklearn
[root@slaver3 Cython-0.24.1]# pip install sklearnCollecting sklearn Collecting scikit-learn (from sklearn) Downloading scikit_learn-0.17.1-cp27-cp27mu-manylinux1_x86_64.whl (17.6MB) 100% |████████████████████████████████| 17.6MB 50kB/s Installing collected packages: scikit-learn, sklearn Successfully installed scikit-learn-0.17.1 sklearn-0.0
4. 驗證是否安裝成功
[root@slaver3 Cython-0.24.1]# ipythonPython 2.7.5 (default, Aug 18 2016, 15:58:25)Type "copyright", "credits" or "license" for more information.IPython 5.1.0 -- An enhanced Interactive Python.? -> Introduction and overview of IPython's features.%quickref -> Quick reference.help -> Python's own help system.object? -> Details about 'object', use 'object??' for extra details.In [1]: from sklearn.datasets import load_irisIn [2]: iris = load_iris()In [3]: iris.dataOut[3]:array( [[ 5.1, 3.5, 1.4, 0.2], [ 4.9, 3. , 1.4, 0.2], [ 4.7, 3.2, 1.3, 0.2], [ 4.6, 3.1, 1.5, 0.2], [ 5. , 3.6, 1.4, 0.2],......
售前咨詢
售后咨詢
備案咨詢
二維碼
TOP