Ubuntu安装numpy,scipy

Ubuntu11.10安装numpy和scipy
一.获取、安装numpy和scipy:
1.安装git:
sudo apt-get install git
2.安装Python-dev:
sudo apt-get install python-dev
3.安装g++:
sudo apt-get install g++
4.安装libatlas-base-dev(科学计算库):
sudo apt-get install libatlas-base-dev
5.安装gfortran(fortran编译器):
sudo apt-get install gfortran
6.获取NumPy:
git clone git://https://www.360docs.net/doc/9c1528114.html,/numpy/numpy.git numpy
7.获取SciPy:
git clone git://https://www.360docs.net/doc/9c1528114.html,/scipy/scipy.git scipy
8.获取:matplotlib
sudo apt-get install python-matplotlib
9.执行下列命令:
export BLAS=/usr/lib/libblas/libblas.so
export LAPACK=/usr/lib/lapack/liblapack.so
export ATLAS=/usr/lib/atlas-base/libatlas.so
9.编译、安装scipy:
cd进scipy的目录,执行:
1):python setup.py build --fcompiler=gnu95
2):sudo python setup.py install --prefix=/usr/local
10.编译、安装numpy:
cd进scipy的目录,执行:
1):python setup.py build --fcompiler=gnu95
2):sudo python setup.py install --prefix=/usr/local
二.获取、安装matplotlib:
1.安装libfreetype6-dev:
sudo apt-get install libfreetype6-dev
2.下载源码:(matplotlib-1.2.0.tar.gz)
https://https://www.360docs.net/doc/9c1528114.html,/matplotlib/matplotlib/downloads
3.cd进matplotlib目录,执行:
1):python setup.py build
2):sudo python setup.py install

相关文档
最新文档