1. 程式人生 > >linux下安裝numpy,pandas,scipy,matplotlib,scikit-learn

linux下安裝numpy,pandas,scipy,matplotlib,scikit-learn

我沒 順序 sci apt 求解 備註 .com sudo cond

python在數據科學方面需要用到的庫:

a。Numpy:科學計算庫。提供矩陣運算的庫。

b。Pandas:數據分析處理庫

c。scipy:數值計算庫。提供數值積分和常微分方程組求解算法。提供了一個非常廣泛的特定函數集合。

d。Matplotlib:數據可視化庫

e。Scikit-learn:機器學習庫

安裝順序如下:

1.pip install numpy
2.pip install pandas

3.pip install scipy

(sudo apt-get install libatlas-base-dev gfortran //這一步是後面安裝scipy所必需的. 備註:這個我沒有先安裝,直接就安裝scipy)
4.pip install matplotlib

(安裝matplotlib之前首先安裝libpng。下載地址:http://pan.baidu.com/s/1o80C5Jk,解壓進入該文件夾,輸入python install setup.py。
安裝freetype,下載地址:http://pan.baidu.com/s/1dE5yvbr,解壓進入該文件夾,輸入python install setup.py。

對於freetype.tar.bz2的包,先進行安裝再解壓,命令:yum install bzip2,bunzip2 freetype-2.6.3.tar.bz2,tar -xvf freetype-2.6.3.tar)

5.pip install -U scikit-learn

建議用pip進行安裝。也可以用yum安裝,apt-get安裝。但是pip安裝的包一般都比較新,所以建議用pip進行安裝。

其實numpy,pandas,scipy,matplotlib可以直接下載一個anaconda就可以了。

具體可以看http://python.jobbole.com/86236/

linux下安裝numpy,pandas,scipy,matplotlib,scikit-learn