【Python】Linux下python科学计算库的安装,,scipy系列库有相
【Python】Linux下python科学计算库的安装,,scipy系列库有相
scipy系列库有相当多的依赖,导致安装过程比较痛苦。要不停的去找依赖。发现一个小日本给出的安装过程:原载:http://memo.yomukaku.net/entries/jbRkQkq1. 安装Python 2.7.3Python 2.7.3のインストール
cd srcwget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgztar zxvf Python-2.7.3.tgzcd Python-2.7.3./configure --prefix=/usr/localmake# altinstallを使ってCentOSに標準で入っているpython 2.6.6と別にインストールするようにします。sudo make altinstall# 確認which python2.7# /usr/local/bin/python2.7
2. 安装distribute distributeのインストール
cd srcwget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.27.tar.gztar zxvf distribute-0.6.27.tar.gzcd distribute-0.6.27sudo python2.7 setup.py install
现在开始,可以使用easy_install-2.7命令了。
これでeasy_install-2.7コマンドが使用可能になりました。
3.安装pip pipのインストール
sudo easy_install-2.7 pip
4.安装PIL(Python Imaging Library)
PIL(Python Imaging Library)のインストール
sudo pip install pil
5.安装numpy numpyのインストール
为了安装numpy、scipy,首先要安装gfortran、blas、lapack
numpy、scipyをインストールするために先ずgfortran、blas、lapackをインストールします。
5.1安装gfortrangfortranのインストール
sudo yum install gcc-gfortran
5.2安装blasblasのインストール
sudo yum install blas-devel
5.3安装lapacklapackのインストール
sudo yum install lapack-devel
5.4安装numpynumpyのインストール
cd ~/srcwget http://downloads.sourceforge.net/project/numpy/NumPy/1.6.2/numpy-1.6.2.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fnumpy%2Ffiles%2FNumPy%2F1.6.2%2F&ts=1351388100&use_mirror=jaisttar zxvf numpy-1.6.2.tar.gzcd numpy-1.6.2python2.7 setup.py buildsudo python2.7 setup.py install
6安装scipyscipyのインストール
cd ~/srcwget http://downloads.sourceforge.net/project/scipy/scipy/0.11.0/scipy-0.11.0.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fscipy%2Ffiles%2Fscipy%2F0.11.0%2F&ts=1351388172&use_mirror=jaisttar zxvf scipy-0.11.0.tar.gzcd scipy-0.11.0python2.7 setup.py buildsudo python2.7 setup.py install
7.安装matplotlibmatplotlibのインストール
必须要装了png.h后,才能安装matplotlib
matplotlibのインストールにはpng.hが必要になるので、予め入れておきます。
sudo yum install libpng-devel然后,就可以安装matplotlib了。
続いてmatplotlib本体をインストールします。
cd ~/srcwget http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.1.1/matplotlib-1.1.1.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmatplotlib%2Ffiles%2Fmatplotlib%2Fmatplotlib-1.1.1%2F&ts=1351382082&use_mirror=jaisttar zxvf matplotlib-1.1.1.tar.gzcd matplotlib-1.1.1pytyon2.7 setup.py buildsudo python2.7 setup.py install
这样,python 2.7.3的环境就配置完成了。
これでpython 2.7.3の環境をひと通りつくることができました。
【Python】Linux下python科学计算库的安装
评论关闭