1. 程式人生 > >centos上安裝theano和Lasagne

centos上安裝theano和Lasagne

1.安裝theano所需的包

sudo yum install python-devel python-nose python-setuptools gcc gcc-gfortran gcc-c++ blas-devel lapack-devel atlas-devel

2.一定要在步驟1完成的基礎上再執行第二步

   安裝numpy:  pip install numpy

   檢視numpy是否能通過測試   在python的控制檯下 import numpy  ;numpy.test()  這一步需安裝pytest模組(pip install pytest),若測試不通過就解除安裝重灌

  安裝scipy: pip install scipy 

   檢視numpy是否能通過測試,同樣執行 scipy.test()

3.在上面的步驟成功後,執行 pip install theano

4.安裝Lasagne

git clone https://github.com/Lasagne/Lasagne.git #從github上拉取檔案, 會建立一個Lasagne目錄
cd Lasagne
pip install -r requirements.txt
sudo python setup.py install # 這一步需要root許可權