首頁 > 網絡資訊 > 技術支持 >
解決Centos7 安裝sklearn gcc: error: ‘-Qunused-
分享至:0
2016-09-06 14:34:45     來源:     點擊:
導讀: 【北京云主機產業基地,長期提供:北京云主機、北京電信云主機、北京聯通云主機、北京雙線云主機、廣東電信云主機、香港免備案云主機、韓國... 【北京云主機產業基地,長期提供:北京云主機、北京電信云主機、北京聯通云主機、北京雙線云主機、廣東電信云主機、香港免備案云主機、韓國免備案云主機】
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,現正在最新讀物都到8.1了
 
2. 正在pipy鍵入pip whl裝置資料
 
https://pypi.python.org/pypi/pip鍵入whl裝置資料
 
鍵入:
 
[[email protected] ~]# wget https://pypi.python.org/packages/9c/32/004ce0852e0a127f07f358b715015763273799bd798956fa930814b60f39/pip-8.1.2-py2.py3-none-any.whl#md5=0570520434c5b600d89ec95393b2650b
--2016-09-05 16:19:48--  https://pypi.python.org/packages/9c/32/004ce0852e0a127f07f358b715015763273799bd798956fa930814b60f39/pip-8.1.2-py2.py3-none-any.whl
Resolving pypi.python.org (pypi.python.org)... 151.101.24.223, 2a04:4e42:6::223
Connecting to pypi.python.org (pypi.python.org)151.101.24.223:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 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.8s
 
2016-09-05 16:19:50 (667 KB/s) - ‘pip-8.1.2-py2.py3-none-any.whl’ saved [1198961/1198961]
裝置
 
[[email protected] ~]# pip install pip-8.1.2-py2.py3-none-any.whl
You 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.0
Successfully installed pip-8.1.2
3. pip裝置sklearn
 
[[email protected] Cython-0.24.1]# pip install sklearn
Collecting 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. 考證能否裝置順利
 
[[email protected] Cython-0.24.1]# ipython
Python 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_iris
 
In [2]: iris = load_iris()
 
In [3]: iris.data
Out[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],
......
 
【1元云購云主機,次月半價續費,云主機首月只要1元,次月半價續費,北京云主機產業基地為您提供全國各地云主機vps服務器,客服電話400-676-2468】 

? ? ?
?
云南时时彩详情开奖