centos 安装scikitlearn

一、安装numpy

下载numpy源码并解压。

wget http://jaist.dl.sourceforge.NET/project/numpy/NumPy/1.9.0/numpy-1.9.0.zip

安装numpy。

[root]# unzip numpy-1.9.0.zip

[root]# cd numpy-1.9.0

[root]# python setup.py install

安装完毕后,重启 。

[root]# reboot

测试是否安装成功,如果能导入numpy库,表示安装成功。

[myhaspl@localhost~]$ python

Python2.7.5 (default,Jun 17 2014,18:11:42)

[GCC4.8.2 20140120 (Red Hat 4.8.2-16)] on linux2

Type"help","copyright","credits" or"license" for more information.

>>>import numpy as np

>>>

二、安装Scipy

在使用 pip install scikit-learn 时报错,是安装依赖包scipy出错。
经过stack overflow查询,需要先运行

yum install blas-devel lapack-devel

wget https://github.com/scipy/scipy/releases/download/v0.17.0/scipy-0.17.0.zip

同上一样安装(注意python版本的兼容性


三、

# pip install scikit-learn


Collecting scikit-learn Downloading http://mirrors.aliyun.com/pypi/packages/f1/dc/5fb2834511eef6f86e17b6ec41c0c7a60733f79633827e75aaa55029a9fa/scikit-learn-0.18.1.tar.gz (8.9MB) 100% |████████████████████████████████| 8.9MB 63.6MB/s Installing collected packages: scikit-learn Running setup.py install for scikit-learn ... done Successfully installed scikit-learn-0.18.1

相关文章

有时候CentOS工作在无互联网的环境下,需要在离线环境下安装一些组件,这次实现的是模拟在离线环境下安...
首先参照https://www.cnblogs.com/wdw984/p/13330074.html,来进行如何安装Centos和离线下载rpm包。 离...
有两个.NET CORE3.1网站部署在CentOS7上(内网IP是192.168.2.32),现在想实现访问http://192.168.2.32...
1、yum -y install vsftpd 安装vsftpd 2、配置vsftpd的配置文件(/etc/vsftpd/vsftpd.conf)主要修改以...
首先去mysql官网下载mysql的离线rpm安装包(https://downloads.mysql.com/archives/community/) Mysql...
第一步下载erlang环境并安装: wget https://packages.erlang-solutions.com/erlang/rpm/centos/7/x86_...