kaggle_1_環境配置

需要安裝的基本就是各種科學計算環境的python包以及ipython。

注意首先要將python升級到2.7以上,參見下文3。


首先如果你機器上連pip都沒有,還要安裝pip

wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate
python get-pip.py


1.安裝一些包依賴:

yum -y install blas blas-devel lapack-devel lapack
yum -y install seaborn scipy
yum -y install freetype freetype-devel libpng libpng-devel
2.接着安裝所需的包(使用豆瓣的地址速度會更快)

pip install matplotlib -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install numpy -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install pandas -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install seaborn 
pip install scipy
3.安裝ipython:

pip Install ipython

注意如果python版本低於2.7的話需要升級python。

wget --no-check-certificate https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz
tar xf Python-2.7.9.tar.xz
cd Python-2.7.9
./configure --prefix=/usr/local
make && make altinstall
mv /usr/bin/python /usr/bin/python2.6.6
ln -s /usr/local/bin/python2.7 /usr/bin/python

yum是不兼容 Python 2.7的,所以yum不能正常工作,我們需要指定 yum 的Python版本

#vi /usr/bin/yum
將文件頭部的
#!/usr/bin/python

改成
#!/usr/bin/python2.6.6

Done!~~~撒花~~~




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章