At first, we should set up the python environment.
maybe we can simply use the apt-get method:
maybe we can simply use the apt-get method:
sudo apt-get install -y python-dev python-pip python-nose gcc g++ git gfortran
for some district such as china, pypi host may not available, we can use other open source, such as pypi.douban.com/simple
Theano also needs
BLAS, LAPACK, ATLAS. just install them
sudo apt-get install -y libopenblas-dev liblapack-dev libatlas-base-dev
then install numpy. During my installation, An error due to numpy 1.10.1+ can cause failure of test of theano.
So we can download earlier edition's (such as 1.9.2) source code of numpy, then install it. As we have installed gfortran. The step can be:
sudo tar -zxvf numpy-1.9.2.gz.zip
cd numpy-1.9.2
sudo python setup.py build
--fcompiler=gnu95
sudo python setup.py install
After the set-up of numpy. we should test numpy.
python -c 'import numpy; numpy.test()'
it shouldn't have any error return.
then install scipy. As I got none error from scipy, so we can just install scipy by pip
sudo pip install scipy
then test it:
python -c 'import scipy; scipy.test()'
Also no error is accepted
then install
theano.
sudo pip install theano
also test it:
sudo python -c 'import theano; theano.test()'
this test step is really time-consuming, wait and check it has no error.
then theano is successfully set up.
then install Nivida gpu develop drivers.
if error of blas not found errors, sudo apt-get install gfortran libopenblas-dev liblapack-dev
No comments:
Post a Comment