标签:
http://deeplearning.net/software/theano/install_ubuntu.html#install-ubuntu
以上链接为官网安装教程
在ubuntu中安装theano相对于在window上安装简单很多。
如果你是Ubuntu 16.04系统
安装流程如下:
sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git sudo pip install Theano # cuda 7.5 don‘t support the default g++ version. Install an supported version and make it the default. sudo apt-get install g++-4.9 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10 sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 sudo update-alternatives --set cc /usr/bin/gcc sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 sudo update-alternatives --set c++ /usr/bin/g++ # Work around a glibc bug echo -e "\n[nvcc]\nflags=-D_FORCE_INLINES\n" >> ~/.theanorc
如果你是Ubuntu 11.10 到 14.04版本
安装流程如下:
sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git sudo pip install Theano
如果你的版本是Ubuntu 11.04
安装流程如下:
sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ git libatlas3gf-base libatlas-dev sudo pip install Theano
以上安装是基于python2 的
在版本Ubuntu 14.04 上如果你想使用python3 请将上述的
sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git
修改为:
sudo apt-get install python3-numpy python3-scipy python3-dev python3-pip python3-nose g++ libopenblas-dev git
使用下述代码验证python包有没有安装成功
python -c "import numpy; numpy.test()"
python -c "import scipy; scipy.test()"
python -c "import theano; theano.test()"
标签:
原文地址:http://www.cnblogs.com/zangyu/p/5571198.html