CentOS6.5安装scikit-learn

1.安装python2.7.3

# wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
# tar -jxvf Python-2.7.3.tar.bz2
# cd Python-2.7.3
# ./configure
# make all    
# sudo make install
# make clean
# make distclean
# mv /usr/bin/python /usr/bin/python2.6.6
# ln -s /usr/local/bin/python2.7 /usr/bin/python
# vi /usr/bin/yum
将文件头部的
#!/usr/bin/python
改成
#!/usr/bin/python2.6.6

2.安装distribute0.6.27

# cd /usr/local
# wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.27.tar.gz
# tar zxvf distribute-0.6.27.tar.gz
# cd distribute-0.6.27
# sudo python setup.py install
3.安装numpy1.6.2

# sudo yum install gcc-gfortran
# sudo yum install blas-devel
# sudo yum install lapack-devel
# cd /usr/local
# wget http://downloads.sourceforge.net/project/numpy/NumPy/1.6.2/numpy-1.6.2.tar.gz?r=http://sourceforge.net/projects/numpy/files/NumPy/1.6.2/&ts=1351388100&use_mirror=jaist
# tar zxvf numpy-1.6.2.tar.gz
# cd numpy-1.6.2
# python setup.py build
# sudo python setup.py install
4.安装scipy0.11.0

# cd /usr/local
# wget http://downloads.sourceforge.net/project/scipy/scipy/0.11.0/scipy-0.11.0.tar.gz?r=http://sourceforge.net/projects/scipy/files/scipy/0.11.0/&ts=1351388172&use_mirror=jaist
# cd scipy-0.11.0
# python setup.py build
# sudo python setup.py install

5.安装pip

# wget https://bootstrap.pypa.io/get-pip.py
# sudo python get-pip.py
6.安装scikit-learn

# pip install -U scikit-learn

显示Successfully installed scikit-learn,安装成功啦~






你可能感兴趣的:(python)